summaryrefslogtreecommitdiff
path: root/src/map/irc-bot.c
diff options
context:
space:
mode:
authorSusu <bruant.bastien@gmail.com>2013-06-07 20:03:32 +0200
committerSusu <bruant.bastien@gmail.com>2013-06-07 20:03:32 +0200
commitd73783f22b2bb881aab74524d153d89a5932a199 (patch)
treefeea3cd428cee18be3da9bf0bee6d4570d9cad02 /src/map/irc-bot.c
parentdc7f14c7dc9829061f8902354367bdc8467eb841 (diff)
downloadhercules-d73783f22b2bb881aab74524d153d89a5932a199.tar.gz
hercules-d73783f22b2bb881aab74524d153d89a5932a199.tar.bz2
hercules-d73783f22b2bb881aab74524d153d89a5932a199.tar.xz
hercules-d73783f22b2bb881aab74524d153d89a5932a199.zip
Hercules Renewal Phase One : pc, party, map, timer
Added iPc, iParty, iMap, iTimer to HPM exported interfaces
Diffstat (limited to 'src/map/irc-bot.c')
-rw-r--r--src/map/irc-bot.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c
index fea5f523a..7f03ed8d4 100644
--- a/src/map/irc-bot.c
+++ b/src/map/irc-bot.c
@@ -29,12 +29,12 @@ int irc_connect_timer(int tid, unsigned int tick, int id, intptr_t data) {
opt.silent = 1;
opt.setTimeo = 0;
- ircbot->last_try = gettick();
+ ircbot->last_try = iTimer->gettick();
if( ( ircbot->fd = make_connection(ircbot->ip,hChSys.irc_server_port,&opt) ) > 0 ){
session[ircbot->fd]->func_parse = ircbot->parse;
session[ircbot->fd]->flag.server = 1;
- add_timer(gettick() + 3000, ircbot->identify_timer, 0, 0);
+ iTimer->add_timer(iTimer->gettick() + 3000, ircbot->identify_timer, 0, 0);
ircbot->isOn = true;
}
return 0;
@@ -49,7 +49,7 @@ int irc_identify_timer(int tid, unsigned int tick, int id, intptr_t data) {
sprintf(send_string, "NICK %s", hChSys.irc_nick);
ircbot->send(send_string);
- add_timer(gettick() + 3000, ircbot->join_timer, 0, 0);
+ iTimer->add_timer(iTimer->gettick() + 3000, ircbot->join_timer, 0, 0);
return 0;
}
@@ -90,7 +90,7 @@ int irc_parse(int fd) {
ircbot->isIn = false;
ircbot->fails = 0;
ircbot->ip = host2ip(hChSys.irc_server);
- add_timer(gettick() + 120000, ircbot->connect_timer, 0, 0);
+ iTimer->add_timer(iTimer->gettick() + 120000, ircbot->connect_timer, 0, 0);
return 0;
}
@@ -245,8 +245,8 @@ void irc_bot_init(void) {
ircbot->isIn = false;
ircbot->isOn = false;
- add_timer_func_list(ircbot->connect_timer, "irc_connect_timer");
- add_timer(gettick() + 7000, ircbot->connect_timer, 0, 0);
+ iTimer->add_timer_func_list(ircbot->connect_timer, "irc_connect_timer");
+ iTimer->add_timer(iTimer->gettick() + 7000, ircbot->connect_timer, 0, 0);
}
void irc_bot_final(void) {