mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2008
Posts: 13
M
Pikka bird
OP Offline
Pikka bird
M
Joined: Sep 2008
Posts: 13
i have an IRC chat bot that i've created, its really simple.. just helps out the mods in my room and stuff.

but one thing i cant figure out is how to make a command work for NON-mods only.. (i DID figure out how to make them work for mods only)

the command i have is
on *:TEXT:*.com*:#monkeyman1988:/describe $chan // PLEASE ASK BEFORE YOU POST LINKS!!! REPEAT OFFENDERS WILL BE BANNNED!!! ALL SPAMMERS WILL BE REPORTED TO JTV, AND BE GLOBALLY BANNED FROM ALL CHANNELS!!!

it basically just warns people who spam my page.
but mods and myself should be able to post links without that showing up. is there a way to do this?
(sorry if i seem like a noob, im trying to figure this all out on my own, but this is a snag i've hit)

Joined: Sep 2008
Posts: 13
M
Pikka bird
OP Offline
Pikka bird
M
Joined: Sep 2008
Posts: 13
actually nevermind, i figured it out.
the command was
on *:TEXT:*.com*:#monkeyman1988:/describe $chan // PLEASE ASK BEFORE YOU POST LINKS!!! REPEAT OFFENDERS WILL BE BANNNED!!! ALL SPAMMERS WILL BE REPORTED TO JTV, AND BE GLOBALLY BANNED FROM ALL CHANNELS!!!
but by making the command
on -99:TEXT:*.com*:#monkeyman1988:/describe $chan // PLEASE ASK BEFORE YOU POST LINKS!!! REPEAT OFFENDERS WILL BE BANNNED!!! ALL SPAMMERS WILL BE REPORTED TO JTV, AND BE GLOBALLY BANNED FROM ALL CHANNELS!!!
and giving all my mods level 100 access, it made them not trigger the command

Joined: Sep 2008
Posts: 13
M
Pikka bird
OP Offline
Pikka bird
M
Joined: Sep 2008
Posts: 13
well i take that back.. i do need help still.. apparently all i did was break the command all together. lol
im such a noob cry

Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

You could also put an if statement in there instead of having to add all of your ops...

Code:

on *:TEXT:*.com*:#monkeyman1988: {
  if ($nick !isop #) describe # // PLEASE ASK BEFORE YOU POST LINKS!!! REPEAT OFFENDERS WILL BE BANNNED!!! ALL SPAMMERS WILL BE REPORTED TO JTV, AND BE GLOBALLY BANNED FROM ALL CHANNELS!!!
}



Replace !isop with isreg if you mean regular users (no @ and no +)

Joined: Sep 2008
Posts: 13
M
Pikka bird
OP Offline
Pikka bird
M
Joined: Sep 2008
Posts: 13
thanx man ur a RoCkstar (lol-pun)
i had yet to learn any of the if statements.. i'm gonna read through some of the stuff on mirc and see what other cool stuff i can do with those... i appreciate the help

so just so im clear tho.. the "!" before isop means DONT do the command right?

Joined: Feb 2006
Posts: 181
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2006
Posts: 181
Originally Posted By: mIRC Help
The ! not prefix

You can use the ! prefix in front of variables and identifiers in an if-then-else statement to negate a value. The following statements are equivalent.

if (%x == $null) echo x has no value

if (!%x) echo x has no value

Joined: Sep 2008
Posts: 13
M
Pikka bird
OP Offline
Pikka bird
M
Joined: Sep 2008
Posts: 13
sorry.. that made no sence to me.. but thanx crazy

Joined: Feb 2006
Posts: 181
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2006
Posts: 181
Quote:
You can use the ! prefix in front of variables and identifiers in an if-then-else statement to negate a value.

IF:

if ($nick isop #)
nickname v1 [is an op on] channel v2

THEN ( Using the NOT prefix "!"):

if ($nick !isop #)
nickname v1 [is NOT an op on] channel v2


Link Copied to Clipboard