mIRC Home    About    Download    Register    News    Help

Print Thread
Different replies on the same command #257445 09/04/16 09:11 AM
Joined: Apr 2016
Posts: 7
W
Weenig Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
W
Joined: Apr 2016
Posts: 7
Hey Guys,

Can anyone tell me what i have done wrong here?

i want it to give 1 response if a mod triggers the account, and 1 response if a regular user triggers the command:

Code:
on *:TEXT:!j:#: {
  if ($nick !isop $chan) {
    if ((%floodMODS) || ($($+(%,floodMODS.,$nick),2))) { return }
    set -u10 %floodMODS On
    set -u30 %floodMODS. $+ $nick On
    msg $chan /me [MOD RESPONSE]
  }
  else {
    msg $chan [REGULAR USER RESPONSE].
  }
}


Thanks
//Weenig
Scripting novice

Last edited by Weenig; 09/04/16 01:28 PM.
Re: Different replies on the same command [Re: Weenig] #257447 09/04/16 01:19 PM
Joined: Apr 2016
Posts: 7
W
Weenig Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
W
Joined: Apr 2016
Posts: 7
-- UPDATE --

I messed around with it myself and realized that for now i dont need the floodMODS.

However i also noticed if put this code in:
WITH " !isop
Code:
on *:TEXT:!j:#: {
  if ($nick !isop $chan) {
    msg $chan /me Mod Response
  }
  else {
    msg $chan Regular User Response 
  }
}


i get the Mod Response in a chat where i am a moderator, and no response in a chat where im not a moderator.

but if i put this:
WITH just " isop "

Code:
on *:TEXT:!j:#: {
  if ($nick isop $chan) {
    msg $chan /me Mod Response
  }
  else {
    msg $chan Regular User Response 
  }
}


then i get the Regular User Response in a chat where i am a moderator and no response in a channel where i am not a moderator.

Thanks
//Weenig

Last edited by Weenig; 09/04/16 01:29 PM.
Re: Different replies on the same command [Re: Weenig] #257521 18/04/16 12:43 AM
Joined: Oct 2014
Posts: 49
JB_uk Offline
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2014
Posts: 49
The ! before isop does the opposite. As per with everything else such as
Code:
 if $lines(TEXTFILE.txt != 6)
if the number of lines in TEXTFILE.txt don't equal 6, execute whatever follows.