mIRC Home    About    Download    Register    News    Help

Print Thread
#245431 21/04/14 01:38 PM
Joined: Apr 2014
Posts: 7
R
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Apr 2014
Posts: 7
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! }
}

Joined: Apr 2014
Posts: 191
B
Vogon poet
Offline
Vogon poet
B
Joined: Apr 2014
Posts: 191
The code is fine. I see nothing wrong with it.

Joined: Apr 2014
Posts: 7
R
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Apr 2014
Posts: 7
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.

Joined: Jan 2014
Posts: 55
J
Babel fish
Offline
Babel fish
J
Joined: Jan 2014
Posts: 55
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.


Regards

JayStew
Joined: Apr 2014
Posts: 7
R
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Apr 2014
Posts: 7
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.

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
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.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
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).

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Ah, very true. I just skimmed over it.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net

Link Copied to Clipboard