Permalink
Browse files

Clean-up irccommand.pwn

Removed two commands which are not send out by Nuwani.
  • Loading branch information...
xhoogland committed Jan 1, 2017
1 parent 56ff817 commit e0eb6007ef27a7bf0b6c2aec5e835b1374eed3bc
Showing with 4 additions and 36 deletions.
  1. +4 −36 pawn/Resources/IRC/irccommand.pwn
@@ -23,7 +23,7 @@ IRCCommand()
// Due to a bug that crashed the server, we're going to add this little check
for(new i = 0;i<strlen(line);i++)
{ // I know it's not optimized but tbh, it's not super important for this
if(line[i] == 37) line[i] = 176; // Convert % to ° (better than nothing)
if(line[i] == 37) line[i] = 176; // Convert % to ° (better than nothing)
}
return _: RemoteCommand->onCommand(line);
@@ -36,15 +36,6 @@ RunDeprecatedIrcCommand(line[]) {
cmd = strtok(line, idx);
// Command: FixNpcs
// Reconnects the NPCs.
if(!strcmp(cmd, "fixnpcs", true))
{
ServiceController->resetServices();
AddEcho("Done.");
return 1;
}
if(strcmp(cmd,"givetempadmin",true) == 0)
{
new tmp[256], szName [256];
@@ -266,7 +257,6 @@ RunDeprecatedIrcCommand(line[]) {
}
if (strcmp( cmd, "jail", true ) == 0) {
// Felle: updated the jail command, entirely based on !mute
// syntax sent from Nuwani is: jail ircnick playerid minutes
new tmp[256];
tmp = strtok(line, idx);
@@ -294,7 +284,8 @@ RunDeprecatedIrcCommand(line[]) {
// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *
// get the minutes. if no minutes selected (-1) - the ID is muted until someone unmutes them.
// get the minutes. if no minutes selected (-1) - the ID is jailed for JailController::DefaultPunishmentDuration
// in case already in jail: jail for the given amount of minutes, keep in jail for given amount.
new duration = JailController::DefaultPunishmentDuration,
bool: wasJailed = JailController->isPlayerJailed(pid);
@@ -357,29 +348,6 @@ RunDeprecatedIrcCommand(line[]) {
return 1;
}
if(strcmp(cmd, "getid", true) == 0){
new tmp[256];
tmp = strtok(line, idx);
if(!tmp[0])
{
// AdminError("Usage: !getid [playerName]");
return 1;
}
new pid = GetPlayerId(tmp);
if(pid != Player::InvalidId)
{
format(string, sizeof(string), "[getid] %s %d", tmp, pid);
}
else{
format(string, sizeof(string), "[getidnone] %s", tmp);
}
AddEcho(string);
return 1;
}
if(strcmp(cmd, "msg", true) == 0)
{
new tmp[256];
@@ -421,4 +389,4 @@ RunDeprecatedIrcCommand(line[]) {
}
return 0;
}
}

0 comments on commit e0eb600

Please sign in to comment.