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.
mrdr
Halfop
Posts: 42 Joined: Thu Jun 16, 2005 2:20 pm
Location: Lithuania / Vilnius / Underground
Contact:
Post
by mrdr » Fri Jul 22, 2005 6:34 pm
Hey,
I'm sure that you know what this script does.
And I want to make that when I write "deop" or "devoice" I don't need to write "devoice <my nick>" or "deop <my nick>"
I think it's smth like "if {[$tnick == $me]}" or smth... I don't know.
Here is the code:
Code: Select all
bind pub o deop pub:op
proc pub:op {nick uhost hand chan text} {
if {[botisop $chan] == 1} {
if {[string length $text] > 0} {
set tnick [lindex $text 0]
if {[onchan $tnick $chan]} {
if {[isop $tnick $chan]} { pushmode $chan -o $tnick }
} else { puthelp "NOTICE $nick :Tokio nicko kanale nera!" }
} else { puthelp "NOTICE $nick :Naudojimas: deop <nick>" }
} else { puthelp "NOTICE $nick :As neturiu opo!" }
}
bind pub o devoice pub:dv
proc pub:dv {nick uhost hand chan text} {
if {[botisop $chan] == 1} {
if {[string length $text] > 0} {
set tnick [lindex $text 0]
if {[onchan $tnick $chan]} {
if {[isop $tnick $chan]} { pushmode $chan -v $tnick }
} else { puthelp "NOTICE $nick :Tokio nicko kanale nera!" }
} else { puthelp "NOTICE $nick :Naudojimas: devoice <nick>" }
} else { puthelp "NOTICE $nick :As neturiu opo!" }
}
putlog "*** test.tcl - LOADED!"
r0t3n
Owner
Posts: 507 Joined: Tue May 31, 2005 6:56 pm
Location: UK
Post
by r0t3n » Fri Jul 22, 2005 7:02 pm
firstly:
is incorrect, use
Code: Select all
if {[llength $text] >= 1} { set tnick [lindex [split $text] 0]
should be
Code: Select all
set tnick [lindex [split $text] 0]
And are you saying if you type deop or devoice without any nick, you want the bot to deop/devoice yourself?
if yes:
Code: Select all
if {($text == "") || ([llength $text] == 0) } {
set tnick $nick
blah
}
Also
Code: Select all
if {[isop $tnick $chan]} { pushmode $chan -v $tnick }
should be
Code: Select all
if {[isvoice $tnick $chan]} { pushmode $chan -v $tnick }
Also, im so tired, i may have missed something or did something wrong. Just warning you ;p. Hope it works!!
r0t3n @ #r0t3n @ Quakenet
mrdr
Halfop
Posts: 42 Joined: Thu Jun 16, 2005 2:20 pm
Location: Lithuania / Vilnius / Underground
Contact:
Post
by mrdr » Fri Jul 22, 2005 7:21 pm
I'm sure that you're tired, I'm too. I will die with my rollerblades.
Well your script don't work. Or I made mistakes AGAIN.
Here's the code:
Code: Select all
bind pub o deop pub:op
proc pub:op {nick uhost hand chan text} {
if {[botisop $chan] == 1} {
if {[llength $text] >= 1} { set tnick [lindex [split $text] 0]
set tnick [lindex [split $text] 0]
if {[onchan $tnick $chan]} {
if {[isop $tnick $chan]} { pushmode $chan -o $tnick }
} else { puthelp "NOTICE $nick :No such nick!" }
} else { puthelp "NOTICE $nick :Usage: deop <nick>" }
} else { puthelp "NOTICE $nick :I don't have ops!" }
}
}
bind pub o devoice pub:dv
proc pub:dv {nick uhost hand chan text} {
if {[botisop $chan] == 1} {
if {[llength $text] >= 1} { set tnick [lindex [split $text] 0]
set tnick [lindex [split $text] 0]
if {[onchan $tnick $chan]} {
if {[isvoice $tnick $chan]} { pushmode $chan -v $tnick }
} else { puthelp "NOTICE $nick :No such nick!" }
} else { puthelp "NOTICE $nick :Usage: devoice <nick>" }
} else { puthelp "NOTICE $nick :I don't have ops!" }
}
putlog "*** test.tcl - LOADED!"
r0t3n
Owner
Posts: 507 Joined: Tue May 31, 2005 6:56 pm
Location: UK
Post
by r0t3n » Fri Jul 22, 2005 7:38 pm
Code: Select all
bind pub o|o !deop pub:op
proc pub:op {nick uhost hand chan text} {
if {![botisop $chan]} {
putserv "NOTICE $nick :Im not oped on $chan."
return 0
}
if {![llength $text] >= 1} {
putserv "NOTICE $nick :Please enter a nick to deop."
} else {
set tnick [lindex [split $text] 0]
if {![onchan $tnick $chan]} {
putserv "NOTICE $nick :$tnick is not on $chan."
return 0
}
if {![isop $tnick $chan]} {
putserv "NOTICE $nick :$tnick is not oped on $chan."
} else {
pushmode $chan -o $tnick
}
}
}
bind pub o|o !devoice pub:dv
proc pub:dv {nick uhost hand chan text} {
if {![botisop $chan]} {
putserv "NOTICE $nick :Im not oped on $chan."
return 0
}
if {![llength $text] >= 1} {
putserv "NOTICE $nick :Please enter a nick to devoice."
} else {
set tnick [lindex [split $text] 0]
if {![onchan $tnick $chan]} {
putserv "NOTICE $nick :$tnick is not on $chan."
return 0
}
if {![isvoice $tnick $chan]} {
putserv "NOTICE $nick :$tnick is not voiced on $chan."
} else {
pushmode $chan -v $tnick
}
}
}
putlog "*** test.tcl - LOADED!"
Try that...
r0t3n @ #r0t3n @ Quakenet
mrdr
Halfop
Posts: 42 Joined: Thu Jun 16, 2005 2:20 pm
Location: Lithuania / Vilnius / Underground
Contact:
Post
by mrdr » Fri Jul 22, 2005 8:20 pm
Well...
(03:16:56) (@mrdr) !devoice
(03:16:57) ›› [ egghelp (~
buy@weed.lt ) ] Please enter a nick to devoice.
(03:17:06) (@mrdr) !deop
(03:17:06) ›› [ egghelp (~
buy@weed.lt ) ] Please enter a nick to deop.
I want when I write !deop bot deops me.
If I write nick after !deop bot will deop that nick.
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Sat Jul 23, 2005 2:03 am
mrdr wrote:
I want when I write !deop bot deops me.
If I write nick after !deop bot will deop that nick.
Code: Select all
proc pub:deop {nick uhost hand chan text} {
set who [lindex [split $text] 0] ;# who to deop?
if {$who == ""} { ;# no argument given, deop command's issuer
if [isop $nick $chan] {pushmode $chan -o $nick}
} else { ;# deop $who
if [isop $who $chan] {pushmode $chan -o $who}
}
}
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Sat Jul 23, 2005 2:07 am
public kick/mode commands are lame anyway
Decl
Voice
Posts: 26 Joined: Thu Jul 14, 2005 1:50 am
Location: Tartu, Estonia
Contact:
Post
by Decl » Sat Jul 23, 2005 4:17 am
See the LoL's Toolz :p quite useful commands there, plus !op & !deop work without entering a nickname.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sat Jul 23, 2005 4:46 am
mrdr wrote: I want when I write !deop bot deops me.
If I write nick after !deop bot will deop that nick.
Try
FzCommands .
mrdr
Halfop
Posts: 42 Joined: Thu Jun 16, 2005 2:20 pm
Location: Lithuania / Vilnius / Underground
Contact:
Post
by mrdr » Sat Jul 23, 2005 8:51 am
Sir_Fz wrote: mrdr wrote: I want when I write !deop bot deops me.
If I write nick after !deop bot will deop that nick.
Try
FzCommands .
Thank You, nice script.
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Sat Jul 23, 2005 12:11 pm
Code: Select all
if {($text == "") || ([llength $text] == 0) } {
These are the exact same, why would you be checking them both?