-/* cmd_neonserv_chanservsync.c - NeonServ v5.3
+/* cmd_neonserv_chanservsync.c - NeonServ v5.5
* Copyright (C) 2011-2012 Philipp Kreil (pk910)
*
* This program is free software: you can redistribute it and/or modify
CMD_BIND(neonserv_cmd_chanservsync) {
if(neonserv_cmd_chanservsync_used && time(0) - neonserv_cmd_chanservsync_used->last_response < CHANSERVSYNC_END_TIMEOUT) {
- reply(getTextBot(), user, "NS_CHANSERVSYNC_INUSE");
+ reply(textclient, user, "NS_CHANSERVSYNC_INUSE");
return;
}
if(neonserv_cmd_chanservsync_used) {
supp++;
}
if(!f) {
- reply(getTextBot(), user, "NS_CHANSERVSYNC_UNSUPPORTED", botnick, client->user->nick);
+ reply(textclient, user, "NS_CHANSERVSYNC_UNSUPPORTED", botnick, client->user->nick);
}
- reply(getTextBot(), user, "NS_CHANSERVSYNC_KEY", client->user->nick, botnick, botnick, synckey);
+ reply(textclient, user, "NS_CHANSERVSYNC_KEY", client->user->nick, botnick, botnick, synckey);
return;
}
struct neonserv_cmd_chanservsync_cache *cache = malloc(sizeof(*cache));
return;
}
cache->client = client;
- cache->textclient = getTextBot();
+ cache->textclient = textclient;
cache->user = user;
cache->chan = chan;
cache->botnick = strdup(botnick);
cache->last_response = time(0);
neonserv_cmd_chanservsync_used = cache;
putsock(client, "PRIVMSG %s :users %s", botnick, chan->name);
- bind_privnotice(neonserv_cmd_chanservsync_notice_listener);
- reply(getTextBot(), user, "NS_CHANSERVSYNC_SYNCHRONIZING", chan->name, botnick);
+ bind_privnotice(neonserv_cmd_chanservsync_notice_listener, module_id);
+ reply(textclient, user, "NS_CHANSERVSYNC_SYNCHRONIZING", chan->name, botnick);
logEvent(event);
}
cache->caccess = caccess;
cache->seen = seen_time;
cache->flags = flags;
- lookup_authname(username, neonserv_cmd_chanservsync_auth_lookup, cache);
+ lookup_authname(username, module_id, neonserv_cmd_chanservsync_auth_lookup, cache);
}
}
}