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.

script request

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
p
pakistani1
Voice
Posts: 26
Joined: Wed Apr 20, 2005 11:35 pm
Location: Pakistan Zindabad
Contact:

Post by pakistani1 »

now i am using

Code: Select all

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 ::~!~!~!
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

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: Select all


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.
==================================
p
pakistani1
Voice
Posts: 26
Joined: Wed Apr 20, 2005 11:35 pm
Location: Pakistan Zindabad
Contact:

Post by pakistani1 »

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: Select all

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: Select all

if nick != opnick { 
in a tcl
thanx :)
!~!~!~!~!~ ::Long Live The REpubLic ::~!~!~!
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

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: Select all

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: Select all

if nick != opnick { 
in a tcl
thanx :)
This will be like:

Code: Select all

if {$nick != $opnick} {
Alternatively, this is case-sensitive so:

Code: Select all

if {[string tolower $nick] != [string tolower $opnick]} {
But a more better and convenient way would be:

Code: Select all

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.
==================================
p
pakistani1
Voice
Posts: 26
Joined: Wed Apr 20, 2005 11:35 pm
Location: Pakistan Zindabad
Contact:

Post by pakistani1 »

currently i am using

Code: Select all


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 ::~!~!~!
Post Reply