mIRC Home    About    Download    Register    News    Help

Print Thread
#237597 20/05/12 02:41 PM
Joined: Feb 2012
Posts: 9
J
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
J
Joined: Feb 2012
Posts: 9
Hey, I pulled the following script from a QuakeNet website, but I can't get it to work on EFNet. What is wrong..?

Code:
on *:text:operit:#: { userhost $nick | hadd -mz OperIT.Check $nick 5 }
raw 302:*: {
  if ($regex($2,/^([^*=]+)(\*?)/)) var %nick = $regml(1), %oper = $regml(2)
  if (!$hget(OperIT.Check,%nick)) return
  if (%oper) {
    mode # +o %nick
  }
  else {
    say -a LOL! $nick tried to use "operit", and is no IRC Operator..everyone, point and laugh at $nick!
  }
}


It is supposed to give channel mode +o to a IRCop if he writes "operit", and if user is not IRCop, well..point and laugh! smile

And second, I would like to request the script to only give +o in channels that I can define in a file or somewhere in the script. Like, only in #channel1 and channel 2, but not channel3 if I am op in all 3!

Thank you!

JonazThern #238486 02/08/12 05:27 PM
Joined: Feb 2012
Posts: 9
J
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
J
Joined: Feb 2012
Posts: 9
Bring
Up
My
Post

Anyone out there who can push me in the right direction? :S

JonazThern #238487 02/08/12 08:17 PM
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
It's not just EFNet where it won't work. It shouldn't work anywhere.

Part of the problem is that $chan (or #) is not available in raw 302, because there's no channel associated with that event. You need to store it in a variable when the TEXT event occurs, and use that as the #.

Also, instead of /say, you want to /msg %thechannel, since /say will message to whatever window is active, and it may not be the channel.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Link Copied to Clipboard