summaryrefslogtreecommitdiff
path: root/npc/commands/ipcheck.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/commands/ipcheck.txt')
-rw-r--r--npc/commands/ipcheck.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/npc/commands/ipcheck.txt b/npc/commands/ipcheck.txt
index a1f9345c2..501dbfe8b 100644
--- a/npc/commands/ipcheck.txt
+++ b/npc/commands/ipcheck.txt
@@ -19,8 +19,23 @@ OnCall:
//dispbottom strcharinfo(0)+": IP "+getcharip(.@request$);
end;
+OnBan:
+ if (.@atcmd_numparameters == 0) {
+ dispbottom col(l("Syntax: #commandname <reason>"), 1);
+ }
+ .@target$=strcharinfo(0);
+ .@reason$ = implode(.@atcmd_parameters$, " ");
+ dispbottom col(l("You were permanently banned by the GM Team."), 1);
+ sleep2(200);
+ query_sql "INSERT INTO ipbanlist (list,btime,rtime,reason) VALUES ('"+getcharip(.@target$)+"','"+gettime(7)+"-"+gettime(6)+"-"+gettime(5)+" "+gettime(3)+":"+gettime(2)+":"+gettime(1)+"','2030-01-01 00:00:00','"+.@reason$+"')";
+ logmes("was IP-Blocked, and will never connect again."), LOGMES_ATCOMMAND;
+ sleep2(2000);
+ charcommand("@kick "+.@target$);
+ end;
+
OnInit:
bindatcmd "ipcheck", "@ipcheck::OnCall", 80, 100, 1;
+ bindatcmd "ipban", "@ipcheck::OnBan", 99, 100, 1;
end;
}