-/* cmd_neonserv_trim.c - NeonServ v5.3
+/* cmd_neonserv_trim.c - NeonServ v5.5
* Copyright (C) 2011-2012 Philipp Kreil (pk910)
*
* This program is free software: you can redistribute it and/or modify
if(isGodMode(user)) {
event->flags |= CMDFLAG_OPLOG;
} else {
- reply(getTextBot(), user, "NS_ACCESS_DENIED");
+ reply(textclient, user, "NS_ACCESS_DENIED");
return;
}
}
int min_access, max_access;
int duration = strToTime(user, argv[1]);
if(duration < 30) {
- reply(getTextBot(), user, "NS_TRIM_DURATION_TOO_SHORT", 30);
+ reply(textclient, user, "NS_TRIM_DURATION_TOO_SHORT", 30);
return;
}
if(!stricmp(argv[0], "users")) {
if(isGodMode(user)) {
event->flags |= CMDFLAG_OPLOG;
} else {
- reply(getTextBot(), user, "NS_ACCESS_DENIED");
+ reply(textclient, user, "NS_ACCESS_DENIED");
return;
}
}
}
freeModeBuffer(modenode);
char timeBuf[MAXLEN];
- reply(getTextBot(), user, "NS_TRIM_BAN_DONE", bancount, chan->name, timeToStr(user, duration, 3, timeBuf));
+ reply(textclient, user, "NS_TRIM_BAN_DONE", bancount, chan->name, timeToStr(user, duration, 3, timeBuf));
if(bancount)
logEvent(event);
return;
min_access = atoi(argv[0]);
max_access = atoi(seperator);
if(max_access < min_access) {
- reply(getTextBot(), user, "NS_INVALID_ACCESS_RANGE", min_access, max_access);
+ reply(textclient, user, "NS_INVALID_ACCESS_RANGE", min_access, max_access);
return;
}
} else {
if(isGodMode(user)) {
event->flags |= CMDFLAG_OPLOG;
} else {
- reply(getTextBot(), user, "NS_NO_ACCESS");
+ reply(textclient, user, "NS_NO_ACCESS");
return;
}
}
return;
}
cache->client = client;
- cache->textclient = getTextBot();
+ cache->textclient = textclient;
cache->user = user;
cache->event = event;
cache->min_access = min_access;
cache->max_access = max_access;
cache->duration = duration;
- get_userlist_with_invisible(chan, neonserv_cmd_trim_userlist_lookup, cache);
+ get_userlist_with_invisible(chan, module_id, neonserv_cmd_trim_userlist_lookup, cache);
}
static USERLIST_CALLBACK(neonserv_cmd_trim_userlist_lookup) {
}
}
char timeBuf[MAXLEN];
- reply(getTextBot(), user, "NS_TRIM_DONE", trim_count, min_access, max_access, chan->name, timeToStr(user, duration, 3, timeBuf));
+ reply(textclient, user, "NS_TRIM_DONE", trim_count, min_access, max_access, chan->name, timeToStr(user, duration, 3, timeBuf));
if(trim_count)
logEvent(event);
}