This is my snippet number 2 !!
This snippet well add a Nick to an .ini file and then the naxt time the user is join'in a chan the bot is in :)
The bot can only set mode to the modes there a under the bots mode
NOTICE! Well only works if the BOT min are OP'ed!!
Like, if the bot have Owner, then the bot can do the all, set all mode.
But if the bot onlu have OPs, then the bot can MaX set mode the HALFOP
So you understand?
I'm say'ing that if the onlye have mode ADMIN so the bot can onlye set to OP :)
HOW TO
1) Paste the snippet into your remote :)
2) !ADD for add'ed a nick in the .ini file ooO( And the next time the user joins a chan where the bots is, the bot well set mode )
Sorry my bad english ^^
Thx to MashhitDK for giv'ing me the start snippet :)
If you have any problems, you can drop by Project-X.
Irc://Anonymous.dyndns.dk:6667/Xavia
on *:TEXT:!ADD*:#: {
if (!$2) { msg # Something goes wrong? ooO( !ADD <LvL> <NiCK>4 ) }
elseif ($nick !isop $chan) { msg # No $nick you are not an OP! }
elseif ($2 == $readini(AutoJoin.ini,$strip($3),MODE)) { msg # Something wos not right $readini(AutoJoin.ini,$strip($3),MODE) 4) }
;*** Error message
elseif (!$istok(voice halfop op admin owner,$strip($2),32)) && ($3 !ison $chan) { msg $chan Nope, thats was not right ( $upper($1) OWNER/ADMIN/OP/HALFOP/VOiCE <NiCK> )
}
;****************************************************************************************************************************************************************************************
;*** SAVE
else {
writeini -n AutoJoin.ini $replace($strip($3),[,@,],~,|,-) MODE $upper($strip($2))
msg # The Nick its now save'd ind my database ( $2 )
}
;****************************************************************************************************************************************************************************************
}
;****************************************************************************************************************************************************************************************
on *:JOIN:#:if ($readini(AutoJoin.ini,$replace($nick,[,@,],~,|,-),MODE) != $null) && ($me isop $chan) { MODE # $+($replace($readini(AutoJoin.ini,$replace($nick,[,@,],~,|,-),MODE),OWNER,+qao,ADMiN,+ao,OP,+oh,HALFOP,+vh,VOICE,+v),vIe) $nick $nick $nick $nick $nick $nick }
I was not being offensive. Pardon me if I sounded that way to you, Matcou. I was stating the fact that instead of pointing out the fallacy, why not demonstrate what you mean by what you say? Not every user at Hawkee has knowledge in MSL. A picture's worth a thousand words.
Everyone can submit a snippet or script, but that doesn't necessarily mean he or she understands it.
lol I was gonna ask Xavia to add a $strip to $3, but I was in a rush being somewhere...then I forgot it completely. :P I was offering the suggestion off the top of my head. Yes, the tokenize stuff you mentioned should be added under the text event to make sure everything gets stripped out of control codes.
Jethro_ you may as well use tokenize 32 $strip($1-) under the text event
cuz in ur example of
elseif (!$istok(voice halfop op admin owner,$strip($2),32)) && ($3 !ison $chan) {
what if $3 has color? as well if $1 has color?
oh an yes as Matcou stated they are missing " on " at the start of their text event
You can shorten this line:
(voice !isin $strip($2)) && (halfop !isin $strip($2)) && (op !isin $strip($2)) && (admin !isin $strip($2)) && (owner !isin $strip($2)) {
to:
elseif (!$istok(voice halfop op admin owner,$strip($2),32)) && ($3 !ison $chan) {
And add the -n switch after the writeini command:
writeinin -n autojoin.ini ...
This way mIRC will attempt to write the ini command if it's over the size limit allowed...your ini will surely get bigger over time.