| View previous topic :: View next topic |
| Author |
Message |
pakistani1 Voice
Joined: 20 Apr 2005 Posts: 26 Location: Pakistan Zindabad
|
Posted: Tue Apr 26, 2005 2:40 am Post subject: |
|
|
now i am using
| Code: |
setudef flag deop
bind mode - "*+o*" why:nick
bind notc - "*Identification to the nickname*" nick:whyed
proc why:nick {nick uhost hand chan mc vict} {
global whyed
if {![channel get $chan deop]} { return 0 }
putserv "PRIVMSG chanserv@services.dal.net :why $chan $vict"
set whyed([string tolower $vict]) 1
}
proc nick:whyed {nick uhost hand text dest} {
global whyed
if {![info exists whyed([string tolower [lindex [split $text] 0]])]} { return 0 }
if {![string equal -nocase [lindex [split $text] 0] [string trimright [lindex [split $text] end] .]]} {
putquick "KICK [stripcodes [string trimright [lindex [split $text] 5] .]] [string trimright [lindex [split $text] end] .] :You're using someone else's access"
unset whyed([string tolower [lindex [split $text] 0]])
}
}
proc stripcodes {str} {
regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\017|\037|\002|\026|\006|\007} $str "" str
return $str
}
|
and its working gr8 ..
thanx every one for the help .
can that kick thingie be changed to a /cs deop #name nick
and then a notice to the nick " you are using some one else's access "
thanx  _________________ !~!~!~!~!~ ::Long Live The REpubLic ::~!~!~! |
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Tue Apr 26, 2005 4:23 am Post subject: |
|
|
Yes this will do it. Try todo it yourself from next time onwards, always requesting doesn't make you do it and you will therefore always request.
People can't help you, if you can't help yourself. If you really want todo something your way, try todo it yourself.
| Code: |
setudef flag deop
bind mode - "*+o*" why:nick
bind notc - "*Identification to the nickname*" nick:whyed
proc why:nick {nick uhost hand chan mc vict} {
global whyed
if {![channel get $chan deop]} { return 0 }
putserv "PRIVMSG chanserv@services.dal.net :why $chan $vict"
set whyed([string tolower $vict]) 1
}
proc nick:whyed {nick uhost hand text dest} {
global whyed
if {![info exists whyed([string tolower [lindex [split $text] 0]])]} { return 0 }
if {![string equal -nocase [lindex [split $text] 0] [string trimright [lindex [split $text] end] .]]} {
putquick "PRIVMSG chanserv@services.dal.net :DEOP [stripcodes [string trimright [lindex [split $text] 5] .]] [stripcodes [string trimright [lindex [split $text] end] .]]"
unset whyed([string tolower [lindex [split $text] 0]])
}
}
proc stripcodes {str} {
regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\017|\037|\002|\026|\006|\007} $str "" str
return $str
}
|
_________________ ·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
================================== |
|
| Back to top |
|
 |
pakistani1 Voice
Joined: 20 Apr 2005 Posts: 26 Location: Pakistan Zindabad
|
Posted: Tue Apr 26, 2005 6:31 am Post subject: |
|
|
the above script takes the access of the nick from chanserv .. and sends a msg to chanserv requesting deop of the origional nick that has access to the channel .. not the current nick of the user. is it possible to parse the chanserves msg .. something like this
| Code: |
set nick [lindex [split $msg] 0]
set chan [string trim [lindex [split $msg] 5] .]
set opnick [string trim [lindex [split $msg] end] .]
|
if yes wher ein the above script should i use this ..
plus .. how can i do a
| Code: | | if nick != opnick { |
in a tcl
thanx  _________________ !~!~!~!~!~ ::Long Live The REpubLic ::~!~!~! |
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Tue Apr 26, 2005 7:03 am Post subject: |
|
|
| pakistani1 wrote: | the above script takes the access of the nick from chanserv .. and sends a msg to chanserv requesting deop of the origional nick that has access to the channel .. not the current nick of the user. is it possible to parse the chanserves msg .. something like this
| Code: |
set nick [lindex [split $msg] 0]
set chan [string trim [lindex [split $msg] 5] .]
set opnick [string trim [lindex [split $msg] end] .]
|
if yes wher ein the above script should i use this ..
plus .. how can i do a
| Code: | | if nick != opnick { |
in a tcl
thanx  |
This will be like:
| Code: |
if {$nick != $opnick} {
|
Alternatively, this is case-sensitive so:
| Code: |
if {[string tolower $nick] != [string tolower $opnick]} {
|
But a more better and convenient way would be:
| Code: |
if {![string equal -nocase $nick $opnick]} {
|
_________________ ·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
================================== |
|
| Back to top |
|
 |
pakistani1 Voice
Joined: 20 Apr 2005 Posts: 26 Location: Pakistan Zindabad
|
Posted: Sun Oct 07, 2007 5:06 pm Post subject: |
|
|
currently i am using
| Code: |
setudef flag deop
bind mode - "*+o*" why:nick
bind notc - "*Identification to the nickname*" nick:whyed
proc why:nick {nick uhost hand chan mc vict} {
global whyed
if {![channel get $chan deop]} { return 0 }
putserv "PRIVMSG chanserv@services.dal.net :why $chan $vict"
set whyed([string tolower $vict]) 1
}
proc check:verify {nick host hand arg {dest ""}} {
set msg [ctrl:filter $arg]
if {[string equal $dest $::botnick]} {
# Parse ChanServ's message.
set nick [lindex [split $msg] 0]
set chan [string trim [lindex [split $msg] 5] .]
set opnick [string trim [lindex [split $msg] 12] .]
}
}
proc nick:whyed {nick uhost hand text dest} {
global whyed
if {[string tolower $nick] != [string tolower $opnick]} {
putquick "KICK [stripcodes [string trimright [lindex [split $text] 5] .]] [string trimright [lindex [split $text] 12] .] :You're using someone else's access"
unset whyed([string tolower [lindex [split $text] 0]])
}
}
proc stripcodes {str} {
regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\017|\037|\002|\026|\006|\007} $str "" str
return $str
} |
its not working .. the bot does a /cs why # nick ..
but doesnot kick
if {[string tolower $nick] != [string tolower $opnick]} {
[/code] _________________ !~!~!~!~!~ ::Long Live The REpubLic ::~!~!~! |
|
| Back to top |
|
 |
|