| View previous topic :: View next topic |
| Author |
Message |
ZzozZ Voice
Joined: 13 Nov 2010 Posts: 10
|
Posted: Sat Nov 13, 2010 7:03 pm Post subject: Request script for private commands |
|
|
Can any write script for private commands.
I mean weh i write msg to my bot !op <user>, then my bot give @ on that user.
i dont want all users see ho control the bot. |
|
| Back to top |
|
 |
Torrevado Op
Joined: 02 Aug 2006 Posts: 101
|
Posted: Sat Nov 13, 2010 8:30 pm Post subject: |
|
|
Some tcl scripts already do that. Search on TCL Archive
Example: this one can do it both pub or msg. |
|
| Back to top |
|
 |
ZzozZ Voice
Joined: 13 Nov 2010 Posts: 10
|
Posted: Sun Nov 14, 2010 5:11 am Post subject: |
|
|
thanx, but i need code. i want to edit and write my commands, not only op, deop and etc.
i need just one ecxample how can i do that |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Mon Nov 15, 2010 8:37 pm Post subject: |
|
|
@ZzozZ: would this be a set channel? if someone is sending /msg <YourBot> !op <nickname> we would be able to op the <nickname> all of eggdrop's channel that <nickname> is on. but if you want to do it to a specific channel that would be little easyer. or have them provide a channel. _________________ TCL the misunderstood |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Tue Nov 16, 2010 12:12 pm Post subject: Re: Request script for private commands |
|
|
| ZzozZ wrote: |
...
i dont want all users see ho control the bot. |
The easiest, simplest way to do this, is to log into your bot via either DCC or telnet, and issue the command(s) there... in the partyline.
http://www.egghelp.org/commands/irc.htm#op |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Tue Nov 16, 2010 12:36 pm Post subject: |
|
|
| ZzozZ wrote: | thanx, but i need code. i want to edit and write my commands, not only op, deop and etc.
i need just one ecxample how can i do that |
Here is an example.
It does not include anything extra. Typically, one might like to check to be sure the bot itself is op'd, ... that the user nick submitted to be op'd is even on the channel, etc.
This script works on only one channel, and you set that channel in the script.
The command is:
/msg botnick !op <nick>
and as it is written below, will only work for bot owner(s).
| Code: |
#set your channel here
set mychan "#channelname"
bind msg n "!op" give_op
proc give_op {nick uhost handle text} {
global mychan
set nick_to_op "[lindex [split $text] 0]"
pushmode $mychan +o $nick_to_op
}
|
Some excellent reference to read and bookmark:
http://www.eggheads.org/support/egghtml/1.6.20/tcl-commands.html
http://suninet.the-demon.de/
http://www.tcl.tk/man/tcl8.5/TclCmd/contents.htm
I hope this helps.
Suggestion: Give it a try. write some TCL scripts, .. experiment and have fun with them. You can post them here (in the Scripting Help section) , if and when you need help with them. |
|
| Back to top |
|
 |
|