From 1114eb3da58b078258a824424fef687a1ccee90c Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 25 Sep 2013 08:50:52 -0300 Subject: Renamed iTimer interface to timer. Also removed duplicate mentions of timer within calls to shorten. --- src/map/irc-bot.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/map/irc-bot.c') diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c index b17015b66..5225672af 100644 --- a/src/map/irc-bot.c +++ b/src/map/irc-bot.c @@ -27,7 +27,7 @@ char send_string[IRC_MESSAGE_LENGTH]; /** * Timer callback to (re-)connect to an IRC server - * @see iTimer->do_timer + * @see timer->do_timer */ int irc_connect_timer(int tid, unsigned int tick, int id, intptr_t data) { struct hSockOpt opt; @@ -37,12 +37,12 @@ int irc_connect_timer(int tid, unsigned int tick, int id, intptr_t data) { opt.silent = 1; opt.setTimeo = 0; - ircbot->last_try = iTimer->gettick(); + ircbot->last_try = timer->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; - iTimer->add_timer(iTimer->gettick() + 3000, ircbot->identify_timer, 0, 0); + timer->add(timer->gettick() + 3000, ircbot->identify_timer, 0, 0); ircbot->isOn = true; } return 0; @@ -50,7 +50,7 @@ int irc_connect_timer(int tid, unsigned int tick, int id, intptr_t data) { /** * Timer callback to send identification commands to an IRC server - * @see iTimer->do_timer + * @see timer->do_timer */ int irc_identify_timer(int tid, unsigned int tick, int id, intptr_t data) { if( !ircbot->isOn ) @@ -61,14 +61,14 @@ 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); - iTimer->add_timer(iTimer->gettick() + 3000, ircbot->join_timer, 0, 0); + timer->add(timer->gettick() + 3000, ircbot->join_timer, 0, 0); return 0; } /** * Timer callback to join channels (and optionally send NickServ commands) - * @see iTimer->do_timer + * @see timer->do_timer */ int irc_join_timer(int tid, unsigned int tick, int id, intptr_t data) { if( !ircbot->isOn ) @@ -119,7 +119,7 @@ int irc_parse(int fd) { ircbot->isIn = false; ircbot->fails = 0; ircbot->ip = host2ip(hChSys.irc_server); - iTimer->add_timer(iTimer->gettick() + 120000, ircbot->connect_timer, 0, 0); + timer->add(timer->gettick() + 120000, ircbot->connect_timer, 0, 0); return 0; } @@ -427,8 +427,8 @@ void irc_bot_init(void) { ircbot->isIn = false; ircbot->isOn = false; - iTimer->add_timer_func_list(ircbot->connect_timer, "irc_connect_timer"); - iTimer->add_timer(iTimer->gettick() + 7000, ircbot->connect_timer, 0, 0); + timer->add_func_list(ircbot->connect_timer, "irc_connect_timer"); + timer->add(timer->gettick() + 7000, ircbot->connect_timer, 0, 0); } /** -- cgit v1.2.3-60-g2f50