mIRC Home    About    Download    Register    News    Help

Print Thread
#115637 28/03/05 01:53 PM
Joined: Mar 2005
Posts: 9
M
milKeR Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Mar 2005
Posts: 9
on *:TEXT:*:#mychannel:{
if (# isin $1-) {
if ($me isop $chan) {
msg $chan No advertise $nick !
}
}

This script are meant to say to people that types the letter "#" in his sentence: No avdvertise $nick !

But! The script only reacts when they type #mychannel not #Jürgenschannel for exampel!

Some help please!

And one thing more.. It would be great if admins.. people with @, could type #Jürgenschannel without a reaction from the script!

#115638 28/03/05 02:14 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
you would have needed to so something like...
if ($(#,) isin $1-)
becuase # is a special value that expands to the current channel, so you surround it with $( ,) which is like $eval( ,0) meaning dont evaluate it at all, just leave it as #

however this catches any text with # in it when your an OP and if the nick isnt an OP then it messages the channel.
on @*:TEXT:*#*:#mychannel:{ if ($nick !isop #) { msg $chan No advertise $nick ! } }

now i wasnt sure if you ment an op saying any #etc or just #Jürgenschannel so....
on @*:TEXT:*#*:#mychannel:{ if (($nick !isop #) || (#Jürgenschannel !isin $strip($1-)) { msg $chan No advertise $nick ! } }

#115639 28/03/05 02:19 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
on @*:TEXT:*:#mychannel: {
  if ($nick isop $chan) return
  if ($chr(35) isin $strip($1-)) {
    msg $chan No advertise $nick !
  }
}

#115640 28/03/05 04:30 PM
Joined: Mar 2004
Posts: 175
Vogon poet
Offline
Vogon poet
Joined: Mar 2004
Posts: 175
Using isin kicks users that have the character # inside one of their words. I think $wildtok would be a wiser choice in my opinion.

Code:
on @*:TEXT:*:#mychannel: {
  if ($nick !isop $chan) && ($wildtok($strip($1-),#*,0,32)) {
    msg $chan No advertise $nick !
  }
}


- Relinsquish
#115641 28/03/05 08:49 PM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
I like this idea. You also might consider checking if they're typing your channel name or others.

Code:
 on @*:TEXT:*:#: {
  if ($nick !isop $chan) && ($wildtok($strip($1-),#*,0,32)) && ($matchtok($strip($1-),$(#, ),1,32) != $chan) {
    .msg $chan No advertise $nick !
  }
}
  


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!

Link Copied to Clipboard