mIRC Home    About    Download    Register    News    Help

Print Thread
#129149 02/09/05 07:49 PM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
Code:
on *:TEXT:*:#:{
  if (@yahoo.com isin $1-) {
    [task to perform]
  }
}

on *:ACTION:*:#:{
  if (@yahoo.com isin $1-) {
    [task to perform]
  }
}


how can i make the my script the "@yahoo.com" becaus in me script it cant... is it possible to combimed those two script.. thankz in advance... more power to you all coders...

#129150 02/09/05 07:55 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
It seems to do fine here. And, no, you can't combine two different event types into one.


Invision Support
#Invision on irc.irchighway.net
#129151 02/09/05 08:23 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Here's something you could do but its still using On Text/Action. But also using signals..

Code:
On *:Text:*:#: { .signal -n event | %event.type = $event | %event.msg = $1- }
On *:Action:*:#: { .signal -n event | %event.type = $event | %event.msg = $1- }

On *:SIGNAL:event: {
  if (%event.type == text) || (%event.type == action)) {
    if (@yahoo.com isin %event.msg) [Task to perform]
  }
}


Hope this helps.

-Andy

#129152 02/09/05 11:48 PM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
i cant make it detect the whole "@yahoo.com" in the test@yahoo.com im making a kick script which kicks a some1 if they advertise thier friendster accounts in a particular channel... that "[task to perform]" are like "kick # $nick addz not allowed" can tto get it working...

#129153 03/09/05 02:35 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Try this
Code:
 on *:TEXT:*:#:{
  if (*@yahoo.com iswm $1-) {
    [task to perform] 
 }
}
on *:ACTION:*:#:{
  if (*@yahoo.com iswm $1-) {
    [task to perform]
  }
}
 

#129154 03/09/05 04:28 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Code:
on *:TEXT:*:#:{ yahookiller TEXT $nick $chan $1- }
on *:ACTION:*:#:{ yahookiller ACTION $nick $chan $1- }
alias -l yahookiller {
  ; $1 = TEXT or ACTION
  ; $2 = NICK
  ; $3 = CHAN
  ; $4- = TEXT
  if (@yahoo.com isin $strip($4-)) {
    [task to perform]
  }
}


The only really important thing i have done here is add $strip() incase thier using highlighting to attempt to avoid the detection.
I also passed the event type nick and channel as $1 $2 $3 only becuase I did. you dont really need them like that but might have a reason at least for $1 i doubt it tho.

#129155 03/09/05 07:17 AM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
Why not just

Code:
on @!*:TEXT:*@yahoo.com*:#:ban -ku180 $chan $nick 1 No advertizing!
on @!*:ACTION:*@yahoo.com*:#:ban -ku180 $chan $nick 1 No advertizing!

Kicks and bans for 180 seconds (3 mins)


Link Copied to Clipboard