mIRC Homepage

Different replies on the same command

Posted By: Weenig

Different replies on the same command - 09/04/16 09:11 AM

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
Posted By: Weenig

Re: Different replies on the same command - 09/04/16 01:19 PM

-- 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
Posted By: JB_uk

Re: Different replies on the same command - 18/04/16 12:43 AM

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.
© 2020 mIRC Discussion Forums