mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2003
Posts: 22
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: May 2003
Posts: 22
Hey all, trying to figure out a couple things here. First thing is condensing the individual triggers into one instance (not having each one in it's own whole section. and the other problem I'm having is having the remote ban with a reason through Undernets X bot-tried a few things so far but it never give a reason on ban.

Thanks all for any help provided smile

here's the existing code I have so far:

on *:text:*:#depression:{

if (*meep*meep* iswm $strip($1-)) {

msg x ban #depression $nick

}

}

on *:text:*:#depression:{

if (*m33p*m33p* iswm $strip($1-)) {

msg x ban #depression $nick

}

}

on *:text:*:#depression:{

if (*moop*moop* iswm $strip($1-)) {

msg x ban #depression $nick

}

}

Joined: Dec 2002
Posts: 2,033
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,033
/help ||

Code:

on *:TEXT:*:#depression:{
  tokenize 32 $strip($1-)
  if ((*meep*meep* iswm $1-) || (*m33p*m33p* iswm $1-) || (*moop*moop* iswm $1-)) {
    msg x KICK #depression $nick [reason]
  }
}



Look here for your second problem.

Joined: May 2003
Posts: 22
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: May 2003
Posts: 22
that works through X on a kick but when tested it with ban still gives no reason-would there be a way to change it to ban with a hostmask instead of using $nick ? (thinking may have to go that route since X requires an addy to ban-maybe that'd solve that prob for me.

but the condensed script does work great (other than setting a tad too global of a ban on my IP in testing)


ShadowWlf
Server Administrator Rancho.ForeverChat.net
Joined: Dec 2002
Posts: 2,033
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,033
Try msg X ban #depression $address($nick,3) [reason]

From xcmds.txt...

- The ban reason can be a maximum of 128 characters.
- If no duration and/or level is specified, the default will be a duration of 3 hours at level 75.

Joined: May 2003
Posts: 22
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: May 2003
Posts: 22
that seems to work so far-will have to test more later but it's time to start dinner now

Thanks for the help again smile


ShadowWlf
Server Administrator Rancho.ForeverChat.net
Joined: May 2003
Posts: 22
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: May 2003
Posts: 22
OK that works as it should, since I've been back I've been trying play with it to where will only catch certain nicks (using wildcards)-I know it would involve $nick and either $iif or $ifmatch (unless I'm far off base) from my reading on the remote vars and if-else-then sections in the mirc help, but not sure where to place this part and exactly how to-mainly wanting an example of where so can play with it more (this has gotten past my little bit of knowledge on scripting, and I havent' been messing with it for a couple of years and things change smile

more looking, may be far off based here but would be (only part of the script)I'm not really sure how to do this part

if ((*meep*meep* iswm $1-) && ($nick == *eep*)

as said this is over my head but trying to figure it out myself and seeming to fail.

Thanks again to anyone who can give any help,

ShadowWlf

Last edited by ShadowWlf; 10/10/07 01:11 AM.
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Originally Posted By: ShadowWlf
OK that works as it should, since I've been back I've been trying play with it to where will only catch certain nicks (using wildcards)-I know it would involve $nick and either $iif or $ifmatch (unless I'm far off base) from my reading on the remote vars and if-else-then sections in the mirc help, but not sure where to place this part and exactly how to-mainly wanting an example of where so can play with it more (this has gotten past my little bit of knowledge on scripting, and I havent' been messing with it for a couple of years and things change smile

more looking, may be far off based here but would be (only part of the script)I'm not really sure how to do this part

if ((*meep*meep* iswm $1-) && ($nick == *eep*)

as said this is over my head but trying to figure it out myself and seeming to fail.

Thanks again to anyone who can give any help,

ShadowWlf


$nick match is never wildcarded.

if (*meep*meep* iswm $1-) && ($nick == eep) { works }


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Joined: May 2003
Posts: 22
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: May 2003
Posts: 22
Quote:


$nick match is never wildcarded.

if (*meep*meep* iswm $1-) && ($nick == eep) { works }



so if a person uses *eep, or *opp, etc always how would that be set to catch them? various eg nicks are meepmeep, meeper, beeper, m33p, booper.

I'm just trying to figure it out myself but the example given worked for eep.

it's looking like another sub-check in the script itself to check if on the txt if it is a certain nickmask an if-then-else event. I've forgotten so much of this

here's working code so far (not including my trials on adding specific nicks-they were disasters lol)

on *:TEXT:*:#:{
tokenize 32 $strip($1-)
if ((*meep*meep* iswm $1-) || (*m33p*m33p* iswm $1-) || (*moop*moop* iswm $1-)) {
msg x BAN # $address($nick,3) test
}
}

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Originally Posted By: Lpfix5

$nick match is never wildcarded.


Huh? Sure it is. Just not with ==.

ShadowWlf, you can use wildcards in pretty much any match, but you can't use == when doing so. == means an exact match. For wildcards, use iswm. Of course, if you're doing *text*, then just using isin without any wildcards will work. text isin $nick is basically the same as *text* iswm $nick.

Check if the nick ends with eep:
Code:
if ((*meep*meep* iswm $1-) && (*eep iswm $nick)) { }


Check if the nick begins with eep:
Code:
if ((*meep*meep* iswm $1-) && (eep* iswm $nick)) { }


Check if the nick contains eep somewhere in it (use either):
Code:
if ((*meep*meep* iswm $1-) && (eep isin $nick)) { }
if ((*meep*meep* iswm $1-) && (*eep* iswm $nick)) { }


Remember to make sure your parentheses match properly.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard