often when i am in a channel i see people saying "thank you for voice" when they get voiced. i would like to know what the code for this is.
this is the code :
press Alt+R and Paste...
on ^1:RAWMODE:#: { if ($1 == +v) && ($2 == $me) { msg $chan thanks for the voice $nick } }
Thats a rather bad way to do it. What if they typed +mv yournick? Or +vvv somenick somenick yournick?
ON *:VOICE:#:{
if ($vnick == $me && $nick != chanserv) {
.msg $chan Hey $nick thanks for the +v!
}
}
Ups, you are rigth... your code is much better
than my
When i thing 1stuff, you thing 6 stuff =P
you could always do..
alias parsemodes {
/set -u0 %param 2
/set -u0 %m 1
while (%m <= $len($gettok($1, 1, 32))) {
/set -u0 %chr $mid($gettok($1, 1, 32), %m, 1)
if (%chr isin +-) { /set -u0 %mod %chr }
else {
if ((%chr isincs $remove($gettok($chanmodes,1-3,44),$chr(44))) || (%chr isincs qaohv)) {
/set -u0 %modes $addtok(%modes, $+(%mod,%chr,:,$gettok($1, %param, 32)), 32)
/inc -u0 %param
}
else { /set -u0 %modes $addtok(%modes, $+(%mod,%chr), 32) }
}
/inc -u0 %m
}
return %modes
}
on 1:RAWMODE:#: {
if ($nick != #me) && ($nick != ChanServ) {
if ($istok($parsemodes($1-), $+(+v:,$me), 32)) { /msg $chan Thank you for the voice, $nick $+ ! }
else if ($istok($parsemodes($1-), $+(+h:,$me), 32)) { /msg $chan Thank you for the halfop, $nick $+ ! }
else if ($istok($parsemodes($1-), $+(+o:,$me), 32)) { /msg $chan Thank you for the op, $nick $+ ! }
}
}
>:D
ON OP, ON VOICE , ON HELP, is cleaner, simpler and nicer. And in your code, /var is more appropriate than set -u0.
First off that was a joke. Like i would write 20+lines more code, for what 4 (tops) could do. Secondly, they are var and set are personal preference. Sometimes I have variable last for 3 seconds, givimg me time to use them in anopther alias/remote without them staying in the variables list forever.
Ok, when you need a variable to last for 3 seconds and be accessed outside the alias /set -uN is appropriate. But in this instance where /set -u0 is used, I think your prefernce should be /var.
I think my preference is what i chose to use, and feel comfortable using.
which is the same reason you shouldnt criticise my
else {
HALT
}
neg-- my script won't work without /set's or vars--your will work without a useless else
damn man why are u still arguing over ppls posting comments to your posts that u dont like? all this is just opinions and preferences in scripting ...... hes entitled to his as u are entitled to urs ..... i think he was posting to urs to help u out to show u that u had useless code into yours ..... here your just pluggin the board looking for more attention ..... let it be
Where is this code placed
In a 'remotes' script file. Press Alt+R to open the remotes editor.
how can i make this seen on the open channel instead of just the op computer.
Just remove the dot from in front of msg
ON *:VOICE:#:{
if ($vnick == $me && $nick != chanserv) {
msg $chan Hey $nick thanks for the +v!
}
}