diff options
author | shennetsind <notind@gmail.com> | 2013-06-08 13:15:28 -0700 |
---|---|---|
committer | shennetsind <notind@gmail.com> | 2013-06-08 13:15:28 -0700 |
commit | 13f5061b2640f017028c0d6f9ea0b657631b46c3 (patch) | |
tree | 0304d4af4a803632f2fb9a8aa32455af49882375 /src/map/irc-bot.c | |
parent | 6d042dcbb41cc278f14706e7306412642ea90d3a (diff) | |
parent | d73783f22b2bb881aab74524d153d89a5932a199 (diff) | |
download | hercules-13f5061b2640f017028c0d6f9ea0b657631b46c3.tar.gz hercules-13f5061b2640f017028c0d6f9ea0b657631b46c3.tar.bz2 hercules-13f5061b2640f017028c0d6f9ea0b657631b46c3.tar.xz hercules-13f5061b2640f017028c0d6f9ea0b657631b46c3.zip |
Merge pull request #39 from Earisu/master
Help with renewal phase one and HPM system
Diffstat (limited to 'src/map/irc-bot.c')
-rw-r--r-- | src/map/irc-bot.c | 12 |
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) { |