X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2Fmodules%2FNeonServ.mod%2Fcmd_neonserv_trim.c;h=fea0c0afdb0e9e6ffe5dc90a7a7af11a7e99024d;hp=1e382d67c8f5ee4cac2c7cdb4d87c260154271c5;hb=de5f0224c8b119f1be15457262bd6e66f160657f;hpb=9f5af1bc8ff4e8fc9c28433c76a890a990dd0ae5 diff --git a/src/modules/NeonServ.mod/cmd_neonserv_trim.c b/src/modules/NeonServ.mod/cmd_neonserv_trim.c index 1e382d6..fea0c0a 100644 --- a/src/modules/NeonServ.mod/cmd_neonserv_trim.c +++ b/src/modules/NeonServ.mod/cmd_neonserv_trim.c @@ -38,14 +38,14 @@ CMD_BIND(neonserv_cmd_trim) { 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")) { @@ -56,7 +56,7 @@ CMD_BIND(neonserv_cmd_trim) { if(isGodMode(user)) { event->flags |= CMDFLAG_OPLOG; } else { - reply(getTextBot(), user, "NS_ACCESS_DENIED"); + reply(textclient, user, "NS_ACCESS_DENIED"); return; } } @@ -77,7 +77,7 @@ CMD_BIND(neonserv_cmd_trim) { } 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; @@ -89,7 +89,7 @@ CMD_BIND(neonserv_cmd_trim) { 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 { @@ -100,7 +100,7 @@ CMD_BIND(neonserv_cmd_trim) { if(isGodMode(user)) { event->flags |= CMDFLAG_OPLOG; } else { - reply(getTextBot(), user, "NS_NO_ACCESS"); + reply(textclient, user, "NS_NO_ACCESS"); return; } } @@ -111,7 +111,7 @@ CMD_BIND(neonserv_cmd_trim) { return; } cache->client = client; - cache->textclient = getTextBot(); + cache->textclient = textclient; cache->user = user; cache->event = event; cache->min_access = min_access; @@ -152,7 +152,7 @@ static void neonserv_cmd_trim_async1(struct ClientSocket *client, struct ClientS } } 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); }