Hi,
is there a script that checks if someone that joins your channal is in a member list. And if it's not, it kicks him?
(yep bad english i'm dutch)
on *:join:#chan: { if (!$istok(%allowed,$nick,32)) && ($me isop $chan) { ban -k $nick You are Not allowed on this channel } }
alias allow {
if (!$istok(%allowed,$$1,32)) { set %allowed $addtok(%allowed,$$1,32) | echo -a $$1 added to your allow list }
else { echo -a Error $$1 is already on your allow list }
}
Add those, and everytime you want to allow someone you type /allow someonesnickhere
I've made a delete one, too, but alterativly you can open up the variables tab and delete their nick
alias delete {
if ($istok(%allowed,$$1,32)) {
set %allowed $remtok(%allowed,$$1,32) | echo -a $$1 deleted from your allow list
}
else { echo -a Error $$1 is not on your allow list
}
}
And is there anyway it checks a web page or something if it contains the name that someone uses?
Ummm.. No. My script doesn't... But if you want to use a lot of names you could make it read a text file or something.
on *:join:#: {
noop $read(c:\users\myname\filename.txt,s,$nick)
if ($readn == 0) { ban -k $nick You are Not allowed here }
}
But you'd have to copy their nicks to a text file, and the it would have to look something like this
nick1
nick2
nick3..
etc...
I think using hashs would be better.
This could be done using sockets, however, we would need the exact address of the website before we could go much, if any, further with this.
For something like this, where the information is stored, and then accessed infrequently, using a text file is actually better than a hash table, as it will save on memory requirements, and, on average, the extra time required to read the text file, versus having to check a hash table, just to see if the entry exists (or not) is miniscule.
Ok i will try if i can install the script, i am a noob in this kind of things ^^
sry for the doublepost:
it doesn't work, must there be an exect location you place it or is anywhere in the remote just fine?
Putting the code in any remote file is fine, however, note that the code itself requires the text file with the multiple nicks to be in a specific location, and have a specific name. You can, of course, change that information, but it also has to be changed in the script.