Here is my admin ptokax 330b15.25 commands:
!ban
() - permanently ban IP address of the , followed by kick. Reason is optional.
!banip - permanently ban IP address
!nickban - ban user's nick (if user is connected then he is kicked)
!unban - unban IP address or Nick
!getbanlist - display list of banned IP addresses
!clrtempban - clear tempban list
!clrpermban - clear permban list
!drop - silent kick with tempban
!getinfo - displays basic info on user with given nick
!op - give a temporal Op status to the for one session
!gag - the user cant post to mainchat anymore
!ungag - the user can post to mainchat again
!restart - restart hub
!restartscripts - restart scripting part from the hub
!reloadtxt - reload all textfiles
!addreguser - add registered user with specified profile
!delreguser - remove registered user with
!stat - Show some hub statistics
!topic - Set new topic. Or !topic off - clear topic.
!ipinfo - Show all on/offline users with that ip
!iprangeinfo - Show all on/offline users within that iprange
!userinfo - Show all visits of that user
...
As u can see there is no kick or warn can someone write me a simple !kick or !warn scrips?
i wish it could have settable number of warns b4 kick and settable nb of kicks b4 ban...
PLS PLS PLS help!
...
PS.: Possibly kick and warn command with reason
!kick
QuoteOriginally posted by Hades
Here is my admin ptokax 330b15.25 commands:
!ban () - permanently ban IP address of the , followed by kick. Reason is optional.
!banip - permanently ban IP address
!nickban - ban user's nick (if user is connected then he is kicked)
!unban - unban IP address or Nick
!getbanlist - display list of banned IP addresses
!clrtempban - clear tempban list
!clrpermban - clear permban list
!drop - silent kick with tempban
!getinfo - displays basic info on user with given nick
!op - give a temporal Op status to the for one session
!gag - the user cant post to mainchat anymore
!ungag - the user can post to mainchat again
!restart - restart hub
!restartscripts - restart scripting part from the hub
!reloadtxt - reload all textfiles
!addreguser - add registered user with specified profile
!delreguser - remove registered user with
!stat - Show some hub statistics
!topic - Set new topic. Or !topic off - clear topic.
!ipinfo - Show all on/offline users with that ip
!iprangeinfo - Show all on/offline users within that iprange
!userinfo - Show all visits of that user
...
As u can see there is no kick or warn can someone write me a simple !kick or !warn scrips?
i wish it could have settable number of warns b4 kick and settable nb of kicks b4 ban...
PLS PLS PLS help!
...
PS.: Possibly kick and warn command with reason
!kick
See this
"!drop - silent kick with tempban" Temban means the users is kicked
Hi,
Hope it helps...
--Requested by Hades
--Made by nErBoS
Bot = "Func-Bot"
warn = {}
kicked = {}
function Main()
frmHub:RegBot(Bot)
end
function NewUserConnected(user, data)
if (warn[user.sName] == 3) then
user:SendData(Bot, "You going to be kicked because you had 3 warns.")
user:TempBan()
warn[user.sName] = nil
else
end
if (kicked[user.sName] == 3) then
user:SendData(Bot, "You going to be baned because you had 3 kicks.")
user:TempBan()
kicked[user.sName] = nil
else
end
end
function DataArrival(user, data)
if (strsub(data,1,1)=="<") or (strsub(data,1,5+strlen(Bot))=="$To: "..Bot) then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")
if (cmd=="!kick") then
if (user.bOperator) then
local s,e,usr,reason = strfind(data,"%b<>%s+%S+%s+(%S+)%s+(.*)")
if (usr == nil or reason == nil) then
user:SendData(Bot, "Syntax error, !kick , must have a nick and reason.")
else
if (GetItemByName(usr) == nil) then
user:SendData(Bot, "The user "..usr.." is not online.")
else
local userToBeKicked = GetItemByName(usr)
SendToAll(Bot, "The user "..userToBeKicked.sName" has been kicked by "..user.sName.." because: "..reason)
userToBeKicked:SendPM(Bot, "You have been kicked because: "..reason)
if (kicked[userToBeKicked.sName] == nil) then
kicked[userToBeKicked.sName] = 0
else
kicked[userToBeKicked.sName] = kicked[userToBeKicked.sName] + 1
end
userToBeKicked.sName:TempBan()
end
end
else
user:SendData(Bot, "You don?t have permission to use this command.")
end
return 1
elseif (cmd=="!warn") then
if (user.bOperator) then
local s,e,usr,reason = strfind(data,"%b<>%s+%S+%s+(%S+)%s+(.*)")
if (usr == nil or reason == nil) then
user:SendData(Bot, "Syntax error, !warn , must have a nick and reason.")
else
if (GetItemByName(usr) == nil) then
user:SendData(Bot, "The user "..usr.." is not online.")
else
local userToBeWarned = GetItemByName(usr)
userToBeWarned:SendPM(Bot, "You are been warned because: "..reason)
user:SendData(Bot, "Your warn has been sent.")
if (warn[userToBeWarned.sName] == nil) then
warn[userToBeWarned.sName] = 0
else
warn[userToBeWarned.sName] = warn[userToBeWarned.sName] + 1
end
userToBeWarned.sName:Disconnect()
end
end
else
user:SendData(Bot, "You don?t have permission to use this command.")
end
return 1
end
end
end
Be warn, when ever you restart the script or the Hub the count of kicks and warns will be lost.
Best regards, nErBoS
That's it!!!
Thanx so much!!!
Now i need a script for !kick
And !warn
Example:
Ops types in m chat !warn Dicori Hacked dc++
hub reaction:
User Dicori was warned by because of:hdc
:))
HELP!!!!!
Hi,
Done..
--Requested by Hades
--Made by nErBoS
Bot = "Func-Bot"
warn = {}
kicked = {}
function Main()
frmHub:RegBot(Bot)
end
function NewUserConnected(user, data)
if (warn[user.sName] == 3) then
user:SendData(Bot, "You going to be kicked because you had 3 warns.")
user:TempBan()
warn[user.sName] = nil
else
end
if (kicked[user.sName] == 3) then
user:SendData(Bot, "You going to be baned because you had 3 kicks.")
user:TempBan()
kicked[user.sName] = nil
else
end
end
function DataArrival(user, data)
if (strsub(data,1,1)=="<") or (strsub(data,1,5+strlen(Bot))=="$To: "..Bot) then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")
if (cmd=="!kick") then
if (user.bOperator) then
local s,e,usr,reason = strfind(data,"%b<>%s+%S+%s+(%S+)%s+(.*)")
if (usr == nil or reason == nil) then
user:SendData(Bot, "Syntax error, !kick , must have a nick and reason.")
else
if (GetItemByName(usr) == nil) then
user:SendData(Bot, "The user "..usr.." is not online.")
else
local userToBeKicked = GetItemByName(usr)
SendToAll(Bot, "The user "..userToBeKicked.sName" has been kicked by "..user.sName.." because: "..reason)
userToBeKicked:SendPM(Bot, "You have been kicked because: "..reason)
if (kicked[userToBeKicked.sName] == nil) then
kicked[userToBeKicked.sName] = 0
else
kicked[userToBeKicked.sName] = kicked[userToBeKicked.sName] + 1
end
userToBeKicked.sName:TempBan()
end
end
else
user:SendData(Bot, "You don?t have permission to use this command.")
end
return 1
elseif (cmd=="!warn") then
if (user.bOperator) then
local s,e,usr,reason = strfind(data,"%b<>%s+%S+%s+(%S+)%s+(.*)")
if (usr == nil or reason == nil) then
user:SendData(Bot, "Syntax error, !warn , must have a nick and reason.")
else
if (GetItemByName(usr) == nil) then
user:SendData(Bot, "The user "..usr.." is not online.")
else
local userToBeWarned = GetItemByName(usr)
userToBeWarned:SendPM(Bot, "You are been warned because: "..reason)
user:SendData(Bot, "Your warn has been sent.")
SendToAll(Bot, "User "..userToBeWarned.sName" was warned by "..Bot.." because of "..reason)
if (warn[userToBeWarned.sName] == nil) then
warn[userToBeWarned.sName] = 0
else
warn[userToBeWarned.sName] = warn[userToBeWarned.sName] + 1
end
userToBeWarned.sName:Disconnect()
end
end
else
user:SendData(Bot, "You don?t have permission to use this command.")
end
return 1
end
end
end
Best regards, nErBoS
Thanx so much once more
!!
I going to test it now:))
.........
Warn works kick doesn't!!
Bot doesn't count warns or its still bcuz kick doesnt' work???
Hi,
Sorry the script had little bugs, was made in a horry.
Have test and is working ok...
--Requested by Hades
--Made by nErBoS
Bot = "Func-Bot"
warn = {}
kicked = {}
function Main()
frmHub:RegBot(Bot)
end
function NewUserConnected(user, data)
if (warn[user.sName] == 3) then
user:SendData(Bot, "You going to be kicked because you had 3 warns.")
user:TempBan()
warn[user.sName] = nil
else
end
if (kicked[user.sName] == 3) then
user:SendData(Bot, "You going to be banned because you had 3 kicks.")
user:Ban()
kicked[user.sName] = nil
else
end
end
function DataArrival(user, data)
if (strsub(data,1,1)=="<") or (strsub(data,1,5+strlen(Bot))=="$To: "..Bot) then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")
if (cmd=="!kick") then
if (user.bOperator) then
local s,e,usr,reason = strfind(data,"%b<>%s+%S+%s+(%S+)%s+(.*)")
if (usr == nil or reason == nil) then
user:SendData(Bot, "Syntax error, !kick , must have a nick and reason.")
else
if (GetItemByName(usr) == nil) then
user:SendData(Bot, "The user "..usr.." is not online.")
else
local userToBeKicked = GetItemByName(usr)
SendToAll(Bot, "User "..userToBeKicked.sName.." was kicked by "..Bot.." because of "..reason)
userToBeKicked:SendPM(Bot, "You have been kicked because: "..reason)
if (kicked[userToBeKicked.sName] == nil) then
kicked[userToBeKicked.sName] = 1
else
kicked[userToBeKicked.sName] = kicked[userToBeKicked.sName] + 1
end
userToBeKicked:TempBan()
end
end
else
user:SendData(Bot, "You don?t have permission to use this command.")
end
return 1
elseif (cmd=="!warn") then
if (user.bOperator) then
local s,e,usr,reason = strfind(data,"%b<>%s+%S+%s+(%S+)%s+(.*)")
if (usr == nil or reason == nil) then
user:SendData(Bot, "Syntax error, !warn , must have a nick and reason.")
else
if (GetItemByName(usr) == nil) then
user:SendData(Bot, "The user "..usr.." is not online.")
else
local userToBeWarned = GetItemByName(usr)
userToBeWarned:SendPM(Bot, "You are been warned because: "..reason)
user:SendData(Bot, "Your warn has been sent.")
SendToAll(Bot, "User "..userToBeWarned.sName.." was warned by "..Bot.." because of "..reason)
if (warn[userToBeWarned.sName] == nil) then
warn[userToBeWarned.sName] = 1
else
warn[userToBeWarned.sName] = warn[userToBeWarned.sName] + 1
end
userToBeWarned:Disconnect()
end
end
else
user:SendData(Bot, "You don?t have permission to use this command.")
end
return 1
end
end
end
Best regards, nErBoS
as i tested it tis time it warns and disconnect everytime warning is given but wont kick after 3 warns.
kick works but doesn't give a ban after 3 kicks.
I think counter doesn't work this time
:((
Hi,
Have you restarted the script or the Hub when you kicked or warned ?? Because when you do that the information will be lost.
Best regards, nErBoS
i didn't restart script
I was testing warn command on op though does it matter?
He was getting warn message an was getting sisconnected but i have warned him like 15 times and no kick accured and same with kick.
If you give me a few days, I will give you part of my bot which does just what you want.
Kicks on 4th warning
bans on 3rd kick
Keeps tables in files so you can stop and start hub whenever and still keep kicks and warns.
Let me know if you want it and I will sortit for you.
WooshMan :-)
QuoteOriginally posted by Hades
i didn't restart script
I was testing warn command on op though does it matter?
He was getting warn message an was getting sisconnected but i have warned him like 15 times and no kick accured and same with kick.
Hi,
You were working the command with ops that was my mistake i tought the commands was only to users but here is it..
--Requested by Hades
--Made by nErBoS
Bot = "Func-Bot"
warn = {}
kicked = {}
function Main()
frmHub:RegBot(Bot)
end
function NewUserConnected(user, data)
if (warn[user.sName] == 3) then
user:SendData(Bot, "You going to be kicked because you had 3 warns.")
user:TempBan()
warn[user.sName] = nil
else
end
if (kicked[user.sName] == 3) then
user:SendData(Bot, "You going to be banned because you had 3 kicks.")
user:Ban()
kicked[user.sName] = nil
else
end
end
OpConnected = NewUserConnected
function DataArrival(user, data)
if (strsub(data,1,1)=="<") or (strsub(data,1,5+strlen(Bot))=="$To: "..Bot) then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")
if (cmd=="!kick") then
if (user.bOperator) then
local s,e,usr,reason = strfind(data,"%b<>%s+%S+%s+(%S+)%s+(.*)")
if (usr == nil or reason == nil) then
user:SendData(Bot, "Syntax error, !kick , must have a nick and reason.")
else
if (GetItemByName(usr) == nil) then
user:SendData(Bot, "The user "..usr.." is not online.")
else
local userToBeKicked = GetItemByName(usr)
SendToAll(Bot, "User "..userToBeKicked.sName.." was kicked by "..Bot.." because of "..reason)
userToBeKicked:SendPM(Bot, "You have been kicked because: "..reason)
if (kicked[userToBeKicked.sName] == nil) then
kicked[userToBeKicked.sName] = 1
else
kicked[userToBeKicked.sName] = kicked[userToBeKicked.sName] + 1
end
userToBeKicked:TempBan()
end
end
else
user:SendData(Bot, "You don?t have permission to use this command.")
end
return 1
elseif (cmd=="!warn") then
if (user.bOperator) then
local s,e,usr,reason = strfind(data,"%b<>%s+%S+%s+(%S+)%s+(.*)")
if (usr == nil or reason == nil) then
user:SendData(Bot, "Syntax error, !warn , must have a nick and reason.")
else
if (GetItemByName(usr) == nil) then
user:SendData(Bot, "The user "..usr.." is not online.")
else
local userToBeWarned = GetItemByName(usr)
userToBeWarned:SendPM(Bot, "You are been warned because: "..reason)
user:SendData(Bot, "Your warn has been sent.")
SendToAll(Bot, "User "..userToBeWarned.sName.." was warned by "..Bot.." because of "..reason)
if (warn[userToBeWarned.sName] == nil) then
warn[userToBeWarned.sName] = 1
else
warn[userToBeWarned.sName] = warn[userToBeWarned.sName] + 1
end
userToBeWarned:Disconnect()
end
end
else
user:SendData(Bot, "You don?t have permission to use this command.")
end
return 1
end
end
end
Best regards, nErBoS
QuoteOriginally posted by WooshMan
If you give me a few days, I will give you part of my bot which does just what you want.
Kicks on 4th warning
bans on 3rd kick
Keeps tables in files so you can stop and start hub whenever and still keep kicks and warns.
Let me know if you want it and I will sortit for you.
WooshMan :-)
Of course i want it!!!
Take your time i'm here almost everyday:))