My humble request is simple:
A script dat automatically disconnects very user who has a certain keyword in his/her nick or prevents those users from even entering the hub.
eg.: the trigger phrase(s) is(are) "XYZ"
users like this will be kicked:
[XYZ]SomeUser
SomeXYZUser
SomeUserXYZ
etc
Maybe it would even be possible to add those triggers into a database (text file) by a simple (op-)command like:
!add / !remove
Can someone help me with this?
Many many thanks in advance!
This is what i'm using:
blocked = {
"nick1",
"nick2"
-- add any nick or partial nick between "", use escape character % before brackets [] and other signs
}
function DataArrival(curUser, Data)
if strsub(Data, 1, 13) == "$ValidateNick" then
nick = strsub(Data, 14)
for i,v in blocked do
if strfind(strlower(nick),v) then
curUser:Disconnect()
end
end
end
end
I dunno how to !add or !remove people from the list, that must be advanced coding :P But it works, it disconnects people before they even appear in the userlist.
thanks this looks promising.
but i still would like an option to add/remove a nickfragment via op-command.
but more important: the script should send a message to the opchat / mynick informing me that a user was disconnected. Obviously this time the FULL nick :-)
Thanks in advance
Try this it works great for me
--// Lamer bot by ?V?J??K??, case insensitivity special thanks to amutex! - looks within nick discription and email for any group of charectors in list, auto bans and boots them on entry reporting nick and ip address to specific operator in his main chat window. put your nick in parenthesies where it says admin to be notifyed. it will also find the nick even if they add somthing to end of nick and try relogging. so genisis2 for example would still get disconnected.
botName = "Lamerbot"
--// Ban the following users ip on entry
forbiddenWords = {"bad_boy", "genisis", "n.y.c.p.i.m.p", "birdy"}
admin="you nick here"
function Main()
frmHub:RegBot(botName)
end
--// This function is fired when a new user finishes the login
function NewUserConnected(curUser)
for key,checkWord in forbiddenWords do
if strfind(curUser.sMyInfoString, checkWord, 1, 1) then
SendToNick (admin, "The lamer "..curUser.sName.." was removed "..curUser.sIP.." was the ip.")
curUser:Disconnect()
end
end
end
This uses files n tables but works...
You need to create a dir in yer scripts folder called blocker, then the file that holds all the nicks will be put in here :)
Once you have loaded your bot, do a !addnick user to create the file.. you can then just add partials in as and when and you can also use !delnick to remove the nick again... hope it helps, maybe someone might wanna tidy this up, but as I always say.. it aint pretty, but its functional...
CODE REMOVED BY STRAVIDES
hi there,
i want to have this obtion to kick someone that come with nombers or something else in the nick.. but only in the fisrt part of the nickname !
Thx
P.S. You have this error "Syntax Error: unfinished capture" im using Ptokax ver 0.3.2.6 TestDrive 4 0.00 b.
can you give example of what you mean ie what IS acceptable and what is NOT acceptable
HI
Look i want those with this nicks like.. 12belea to be kicked but not ppl with this kind of nickname like.. belea1980
in a short way: 12belea to be out , belea1980 to be in
Thx
what about Belia12User
there are lots of users out there with
[UK]Belia
or [TELIA]Belia
are they ok too, or does it hav eto be A-Z 1st letter ?
Hi,
i dont care about UK or Telia users... i just dont want to have users with nombers in the first part of the nickname.. just a simply nickname OR with a normal prefix.. but not with nombers.. if its okey with you..
Thx
P.S. I did not know.. here i must give explication why i want this.. and i dont want that.. this sux ?
have u seen this one (http://board.univ-angers.fr/thread.php?threadid=2268&boardid=12) ?
Hi again
hey im not without respect.. but what was that ? "there are lots of users out there with [UK]Belia
or [TELIA]Belia are they ok too, or does it have to be A-Z 1st letter ? "... i just asked if i can keep out users that come with nombers in the first part of the nicknames.. that was all..
Thx.. a simply answers was enough.. if there can be modify that script or not.. thx again !
P.S. Like i said there is an error "Syntax Error: unfinished capture" what does is mean ?