diff --git a/plugins/admincmd.sma b/plugins/admincmd.sma index 9b9f09be..a8e802f0 100755 --- a/plugins/admincmd.sma +++ b/plugins/admincmd.sma @@ -103,9 +103,15 @@ public cmdKick(id,level,cid){ else { #if !defined NO_STEAM - server_cmd("kick #%d ^"%s^"",userid2,reason) + if (reason[0]) + server_cmd("kick #%d ^"%s^"",userid2,reason) + else + server_cmd("kick #%d",userid2) #else - client_cmd(player,"echo ^"%s^";disconnect",reason) + if (reason[0]) + client_cmd(player,"echo ^"Kicked: Reason: %s^";disconnect",reason) + else + client_cmd(player,"echo ^"Kicked^";disconnect",reason) #endif } console_print(id,"Client ^"%s^" kicked",name2) @@ -183,7 +189,7 @@ public cmdBan(id,level,cid){ name,get_user_userid(id),authid, name2,userid2,authid2,minutes,reason) new temp[64] - if (str_to_int(minutes)) + if (str_to_num(minutes)) format(temp,63,"for %s min.",minutes) else temp = "permanently" @@ -192,18 +198,30 @@ public cmdBan(id,level,cid){ new address[32] get_user_ip(player,address,31,1) #if !defined NO_STEAM - server_cmd("kick #%d ^"%s (banned %s)^";wait;addip ^"%s^" ^"%s^";wait;writeip",userid2,reason,temp,minutes,address) + if (reason[0]) + server_cmd("kick #%d ^"%s (banned %s)^";wait;addip ^"%s^" ^"%s^";wait;writeip",userid2,reason,temp,minutes,address) + else + server_cmd("kick #%d ^"banned %s^";wait;addip ^"%s^" ^"%s^";wait;writeip",userid2,temp,minutes,address) #else - client_cmd(player,"echo ^"%s (banned %s)^";disconnect",reason,temp) + if (reason[0]) + client_cmd(player,"echo ^"%s (banned %s)^";disconnect",reason,temp) + else + client_cmd(player,"echo ^"banned %s^";disconnect",temp) server_cmd("addip ^"%s^" ^"%s^";wait;writeip",minutes,address) #endif } else { #if !defined NO_STEAM - server_cmd("kick #%d ^"%s (banned %s)^";wait;banid ^"%s^" ^"%s^";wait;writeid",userid2,reason,temp,minutes,authid2) + if (reason[0]) + server_cmd("kick #%d ^"%s (banned %s)^";wait;banid ^"%s^" ^"%s^";wait;writeid",userid2,reason,temp,minutes,authid2) + else + server_cmd("kick #%d ^"banned %s^";wait;banid ^"%s^" ^"%s^";wait;writeid",userid2,temp,minutes,authid2) #else - client_cmd(player,"echo ^"%s (banned %s)^";disconnect",reason,temp) + if (reason[0]) + client_cmd(player,"echo ^"%s (banned %s)^";disconnect",reason,temp) + else + client_cmd(player,"echo ^"banned %s^";disconnect",temp) server_cmd("banid ^"%s^" ^"%s^";wait;writeip",minutes,authid2) #endif } @@ -256,7 +274,7 @@ public cmdSlap(id,level,cid){ if (!player) return PLUGIN_HANDLED new spower[32],authid[32],name2[32],authid2[32],name[32] read_argv(2,spower,31) - new damage = str_to_int(spower) + new damage = str_to_num(spower) user_slap(player,damage) get_user_authid(id,authid,31) get_user_name(id,name,31) @@ -368,8 +386,9 @@ public cmdPlugins(id,level,cid) return PLUGIN_HANDLED #if !defined NO_STEAM - #define MOTD_LEN 1024 + #define MOTD_LEN 2048 new motd_body[MOTD_LEN],state[4] + new name[32],version[32],author[32],filename[32],status[32] new num = get_pluginsnum() new running = 0 new pos = copy(motd_body,MOTD_LEN,"
Name | Version | Author |
%s | %s | %s |