mIRC Home    About    Download    Register    News    Help

Print Thread
#134488 01/11/05 07:23 PM
Joined: Nov 2005
Posts: 8
T
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Nov 2005
Posts: 8
I got a little problem in my script.

I got

Code:
on *:TEXT:op *:?:/mode $2 +o $nick | //.notice $nick Gata !!!


but when i trigger it. It wont op the user. Also it doesnt display $nick. It just leaves it empty.

-edit

i found out why it wouldnt op me.. I have to type op #chan nick.

Tnx for the help

Last edited by Taenadar; 01/11/05 07:24 PM.
#134489 01/11/05 07:26 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Just a note... you don't need /'s inside a script. It's also a good practice to use {}'s.


Invision Support
#Invision on irc.irchighway.net
#134490 01/11/05 07:30 PM
Joined: Nov 2005
Posts: 8
T
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Nov 2005
Posts: 8
Quote:
Just a note... you don't need /'s inside a script. It's also a good practice to use {}'s.


well since this is working and i dont want to [censored] it all up i leave it like this. I just need a little help with the $nick

#134491 01/11/05 07:36 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
The script isn't written to ever display nick. It's written to op the nick and to notice the nick with a message.

Give an example of what it should be doing.


Invision Support
#Invision on irc.irchighway.net
#134492 01/11/05 07:44 PM
Joined: Nov 2005
Posts: 8
T
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Nov 2005
Posts: 8
well since this working.. leave it smile

i found a new problem...

when i use

Code:
on @!*:TEXT:!kick *:*:/k $2 | //.notice $nick He's gone !!


it will only notice me that the user is kicked. But the guy who should be kicked is still there.

Other questen, when i use * all users can use the commands, right? When i use @ before a script only ops can use it? Because its not allowed that normal users can kick other people

#134493 01/11/05 07:54 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Ok... You're missing pieces in your codes... I think you may want to review the help file.

Invalid:
/kick nick

Valid:
/kick chan nick

Code:
on @*:text:!kick *:#: {
  if ($nick !isop $chan || $2 isop $chan || $2 == [color:red]Your nick[/color]) { return }
  kick $chan $2
  .notice $nick $knick has been kicked.
}


As for @... No, it doesn't mean only ops can use it. It means that it will only work if the BOT (or person with the script) is an op. The way you have it, it will trigger if anyone types the command as long as the bot is an op. It will not trigger if the bot is not an op. You definitely want @ in front because you'll get an error if the bot tries to kick someone when the bot isn't an op if you don't have the @ there. But, you need to include a check to see if the $nick is an op. I included one method above to show how.

You also don't need the ! prefix in an ON TEXT event because you can't trigger those yourself, anyhow.

Btw, for the opping script, you should also put in a check to see if the person SHOULD be opped. The way it is, anyone can become and op if they know the command. You should also have the @ on there like with the kick part so you don't get an error if the bot isn't an op.

Last edited by Riamus2; 01/11/05 08:49 PM.

Invision Support
#Invision on irc.irchighway.net
#134494 01/11/05 08:17 PM
Joined: Nov 2005
Posts: 8
T
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Nov 2005
Posts: 8
Ok tnx for the help but the !kick trigger doesnt work how it have to. When i type !kick nick. It will kick me. That doesnt seems right to me :P

And i cant find the mistake you made.

#134495 01/11/05 08:21 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Hahah! Oops. Ok, it's been fixed. smile


Invision Support
#Invision on irc.irchighway.net
#134496 01/11/05 08:35 PM
Joined: Nov 2005
Posts: 8
T
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Nov 2005
Posts: 8
Ah thank you very much laugh

Still got one question :P... yeah i know all the questions :P

How can i make the !kick trigger not let kick ops.. Or kick me :P

#134497 01/11/05 08:50 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Edited to include that. Just replace the red with your nick. If you use multiple nicks, then stick another || (or) section in that IF line that matches the current one for your nick.


Invision Support
#Invision on irc.irchighway.net
#134498 01/11/05 09:31 PM
Joined: Nov 2005
Posts: 8
T
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Nov 2005
Posts: 8
`tnx dude your a hero laugh if i got more question i will place it here.. the || thing i already knew from javascripting


Link Copied to Clipboard