Set mode
Platform: mIRC
Published Aug 22, 2011
Updated Aug 23, 2011
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 <LvL> <nick> 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 }