mIRC Home    About    Download    Register    News    Help

Print Thread
thank you messages #26710 28/05/03 09:27 PM
Joined: Apr 2003
Posts: 57
V
very_confused Offline OP
Babel fish
OP Offline
Babel fish
V
Joined: Apr 2003
Posts: 57
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.

Re: thank you messages #26711 28/05/03 09:32 PM
Joined: Mar 2003
Posts: 36
B
bugx Offline
Ameglian cow
Offline
Ameglian cow
B
Joined: Mar 2003
Posts: 36
this is the code :

press Alt+R and Paste...

on ^1:RAWMODE:#: { if ($1 == +v) && ($2 == $me) { msg $chan thanks for the voice $nick } }

Re: thank you messages #26712 28/05/03 10:20 PM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Thats a rather bad way to do it. What if they typed +mv yournick? Or +vvv somenick somenick yournick?

Code:
ON *:VOICE:#:{
   if ($vnick == $me && $nick != chanserv) {
      .msg $chan Hey $nick thanks for the +v!
   }
}

Re: thank you messages #26713 29/05/03 12:02 AM
Joined: Mar 2003
Posts: 36
B
bugx Offline
Ameglian cow
Offline
Ameglian cow
B
Joined: Mar 2003
Posts: 36
Ups, you are rigth... your code is much better
than my

When i thing 1stuff, you thing 6 stuff =P

blush

Re: thank you messages #26714 29/05/03 01:23 AM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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


-KingTomato
Re: thank you messages #26715 29/05/03 01:35 AM
Joined: Apr 2003
Posts: 210
S
saxon Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Apr 2003
Posts: 210
ON OP, ON VOICE , ON HELP, is cleaner, simpler and nicer. And in your code, /var is more appropriate than set -u0.

Re: thank you messages #26716 29/05/03 01:38 AM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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.


-KingTomato
Re: thank you messages #26717 29/05/03 01:41 AM
Joined: Apr 2003
Posts: 210
S
saxon Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Apr 2003
Posts: 210
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.

Re: thank you messages #26718 29/05/03 01:57 AM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
I think my preference is what i chose to use, and feel comfortable using.


-KingTomato
Re: thank you messages #26719 29/05/03 02:26 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
which is the same reason you shouldnt criticise my
else {
HALT
}
smirk


new username: tidy_trax
Re: thank you messages #26720 29/05/03 02:33 AM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
neg-- my script won't work without /set's or vars--your will work without a useless else


-KingTomato
Re: thank you messages #26721 29/05/03 03:25 AM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
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


D3m0nnet.com
Re: thank you messages #26722 29/05/03 04:49 PM
Joined: May 2003
Posts: 12
L
laser Offline
Pikka bird
Offline
Pikka bird
L
Joined: May 2003
Posts: 12
Where is this code placed

Re: thank you messages #26723 29/05/03 05:16 PM
Joined: Dec 2002
Posts: 699
N
Nimue Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
In a 'remotes' script file. Press Alt+R to open the remotes editor.

Re: thank you messages #26724 29/05/03 10:44 PM
Joined: May 2003
Posts: 12
L
laser Offline
Pikka bird
Offline
Pikka bird
L
Joined: May 2003
Posts: 12
how can i make this seen on the open channel instead of just the op computer.

Re: thank you messages #26725 29/05/03 10:55 PM
Joined: Dec 2002
Posts: 699
N
Nimue Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Just remove the dot from in front of msg
Code:
ON *:VOICE:#:{
  if ($vnick == $me &amp;&amp; $nick != chanserv) {
    msg $chan Hey $nick thanks for the +v!
  }
}