mIRC Home    About    Download    Register    News    Help

Print Thread
#106240 26/12/04 10:31 PM
Joined: Dec 2004
Posts: 9
L
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Dec 2004
Posts: 9
Hello,

I am working on a script to automatically kick ban users when swearing. Right now I use a simple TEXT Event script. The problem is I need to add a new line for every word I want to ban. I would like to know how to create a variable where I can store words in.

Also maybe anybody knows a help site on Variables where I can learn more? I have been to many but I don't find a extensive one.

Thanks on advance,
Kind regards,
Lord Galdor

#106241 26/12/04 11:11 PM
Joined: Sep 2004
Posts: 237
Fjord artisan
Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
Just a suggestion. That could end up being a lot of variables , have you considered a hash file?

#106242 26/12/04 11:19 PM
Joined: Dec 2004
Posts: 9
L
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Dec 2004
Posts: 9
I must say that I have no idea what you are talking about. I am a newbie and I am just learning. If you could explain or redirect me, that would be kind.

Thank you.

#106243 26/12/04 11:46 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Use search, (use the "Advanced Search tips") there have been swear filter scripts posted on these boards.

Look here for links to scripting sites which should have tutorials on hash tables, and more: http://www.mirc.com/links.html#8

You might also check those sites for ready made swear filter addons, no need to reinvent the wheel. smile

#106244 26/12/04 11:50 PM
Joined: Sep 2004
Posts: 237
Fjord artisan
Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
Well if you look in the remotes editor theres a "Variables" tab , in there are all your global variables ( %var ) there are also local variables ( Read the mIRC help files about both and thier usage ). When you make each possible bad word a variable it is added to the Variables section of the Remotes editor( %fword %sword and so on ), and that can be a lot after a while.
A hash table is a file of sorts that is stored in the ram for quick recovery .... while mIRC is running. With a hash table it will compare input to the entries in the hash table and if the hash table has a matching text to what was typed it will then take the action you have set.
Hash Table Tutorial
There is a link to a downloadable hash table tutorial that might help a little.

#106245 27/12/04 01:46 PM
Joined: Dec 2004
Posts: 9
L
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Dec 2004
Posts: 9
Then I think a hash table is what I need, thank you JAFO. The link you posted should help taking me to the next level. Maybe one day I'll get it.

Also thank you Iori for posting that link. I can see now variables could be a trouble for this job.

I like to design my own protections and codes otherwise I'll never learn you see.

Thanks for your time.


Link Copied to Clipboard