egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

script request
Goto page Previous  1, 2
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
pakistani1
Voice


Joined: 20 Apr 2005
Posts: 26
Location: Pakistan Zindabad

PostPosted: Tue Apr 26, 2005 2:40 am    Post subject: Reply with quote

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 Smile
_________________
!~!~!~!~!~ ::Long Live The REpubLic ::~!~!~!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Tue Apr 26, 2005 4:23 am    Post subject: Reply with quote

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. Wink

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
pakistani1
Voice


Joined: 20 Apr 2005
Posts: 26
Location: Pakistan Zindabad

PostPosted: Tue Apr 26, 2005 6:31 am    Post subject: Reply with quote

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 Smile
_________________
!~!~!~!~!~ ::Long Live The REpubLic ::~!~!~!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Tue Apr 26, 2005 7:03 am    Post subject: Reply with quote

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 Smile


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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
pakistani1
Voice


Joined: 20 Apr 2005
Posts: 26
Location: Pakistan Zindabad

PostPosted: Sun Oct 07, 2007 5:06 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber