This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.
Old posts that have not been replied to for several years.
-
Bader
- Voice
- Posts: 35
- Joined: Sat Mar 12, 2005 5:34 am
Post
by Bader »
hi can i find some tcl,
i need the bot identify oper,
like /oper nickname passhere
to make the bot IRC Operator
-
greenbear
- Owner
- Posts: 733
- Joined: Mon Sep 24, 2001 8:00 pm
- Location: Norway
Post
by greenbear »
Code: Select all
bind dcc n operme operme
proc operme {h i a} {
if ![llength $a] {
putidx $i "Usage: .operme <pass>"
return
}
set p [lindex [split $a] 0]
putserv "oper $::$botnick $p"
putidx $i "Done."
}
Last edited by
greenbear on Wed Mar 16, 2005 2:41 pm, edited 1 time in total.
-
caesar
- Mint Rubber
- Posts: 3778
- Joined: Sun Oct 14, 2001 8:00 pm
- Location: Mint Factory
Post
by caesar »
He said 'like /oper nickname passhere' so unless the oper user is the same as it's botnick will be useless, so I'd go for something like:
Code: Select all
bind dcc n operme operme
proc operme {h i a} {
if {[llength $a] < 2} {
putidx $i "Usage: .operme <user> <pass>"
return
}
set u [lindex [set t [split $a]] 0]
set p [lindex $t 1]
putserv "oper $u $p"
putidx $i "Done."
}
Tip: if {[llength $a]} { means if result is equal with 1 or bigger than 1 and if {![llength $a]} { means if result is equal with 0.
Once the game is over, the king and the pawn go back in the same box.
-
greenbear
- Owner
- Posts: 733
- Joined: Mon Sep 24, 2001 8:00 pm
- Location: Norway
Post
by greenbear »
yea i made the code with both user and pass first, then i figured he'd never want to oper up someone else from the bot, and changed it.
now he have code to do both, even better!
-
Bader
- Voice
- Posts: 35
- Joined: Sat Mar 12, 2005 5:34 am
Post
by Bader »
thaaanks
