mIRC Homepage
Posted By: Razreaper Moderator Commands HELP! - 21/04/14 01:38 PM
I am currently trying to work some of the bugs out of my bot and one issue i am having is with moderator commands.

Whenever a mod enters a mod command it works as intended but if someone who is not a mod issues the command the command still goes through but then after going through says "Sorry, you must be a mod to use this command!"

I need it where if someone who is not modded issues the command the command does NOT go through instead it just displays "Sorry, you must be a mod to use this command!"

thanks for your help and here is my script

on *:TEXT:!social:#: {
if ($nick isop #) { msg # Make sure to follow on facebook and twitter to get announcments when Razreaper goes live. https://www.facebook.com/pages/Razreaper/179770322170130?ref=hl and twitter at https://twitter.com/Razreaper89 }
else { msg # Sorry, you must be a mod to use this command! }
}
Posted By: blessing Re: Moderator Commands HELP! - 21/04/14 02:14 PM
The code is fine. I see nothing wrong with it.
Posted By: Razreaper Re: Moderator Commands HELP! - 21/04/14 02:27 PM
That's what i thought as well. because i used the following code as a model to work from

on *:TEXT:!hi:#: {
if ($nick isop #) { msg # Hello There! }
else { msg # Sorry you must be a mod to use this command }
}

and that code works perfect. but when I used the code for the actual command i want non-mods can post the link then they get the message saying they cant post the link.

I guess i need to check the rest of the code to make sure nothing is interfering with this section.
Posted By: jaystew Re: Moderator Commands HELP! - 21/04/14 02:52 PM
The code does look correct and I've also tested it with no errors found.

If you have more code to this script it would be worth uploading the whole code within the script to see if there is something else causing the problem.
Posted By: Razreaper Re: Moderator Commands HELP! - 21/04/14 04:44 PM
I got it working. I'm not quite sure how but I went back and re-wrote the whole script now it works fine.... probably just a misplaced bracket or something simple. Thanks for checking to make sure the code was correct. The help was much appreciated.
Posted By: Nillen Re: Moderator Commands HELP! - 21/04/14 04:45 PM
Well, what you posted doesn't have a closing bracket.
Code:
if ($nick isop #) { msg # Make sure to follow on facebook and twitter to get announcments when Razreaper goes live.
Posted By: Loki12583 Re: Moderator Commands HELP! - 21/04/14 05:21 PM
Originally Posted By: Nillen
Well, what you posted doesn't have a closing bracket.


That's only because the forum put the text on the next line. It's actually a single line (copy it into notepad or something).
Posted By: Nillen Re: Moderator Commands HELP! - 21/04/14 07:07 PM
Ah, very true. I just skimmed over it.
© mIRC Discussion Forums