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 

Adding auto identify to existing autoop.tcl script! (Solved)

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
chadrt
Voice


Joined: 19 Mar 2006
Posts: 33

PostPosted: Fri Jan 26, 2007 10:26 pm    Post subject: Adding auto identify to existing autoop.tcl script! (Solved) Reply with quote

This is my first time doing anything with TCL I have been reading and I thought I would do something simple so I am modifying someone else's script to add a function to the main script.

Below is my code then I will post my problem and hopefully someone can help. (This is only a partial I am leaving out the credits and other junk so I dont fill the page.)

Code:
set idnick "NickServ"
set idpass "NickServPasswordHere"
set servicenick "ChanServ"
set punish "3"
set deopkickreason "12{Anti Deop Protection} 5Kindly Dont Deop Me Next Time"

bind mode - "*-*o*" RanaUsman:autoreop
proc RanaUsman:autoreop {nick uhost hand chan mode target} {
global botnick servicenick punish deopkickreason
if {($target == $botnick) && ($nick != $botnick)} {
if {($nick == "X") || ($nick == "Q") || ($nick == "L") || ($nick == "chanserv")} { return 0 }
putlog "\002BOT DEOPED ON $chan by $nick"
putlog "\002REOPING BOT ON $chan"
putserv "PRIVMSG $servicenick :op $chan $botnick"
putlog "\002REOP SUCCESSFULL"
utimer 2 [list RanaUsman:punish $nick $uhost $chan]
 }
}
proc RanaUsman:punish {nick uhost chan} {
global punish deopkickreason
if {($punish == 0)} { return 0 }
if {($punish == 1)} {
if {($nick == "X") || ($nick == "Q") || ($nick == "L") || ($nick == "chanserv")} { return 0 }
putquick "KICK $chan $nick :$deopkickreason"
putlog "\002$nick Kicked from $chan for Deoping me on $chan "
 }
if {($punish == 2)} {
if {($nick == "X") || ($nick == "Q") || ($nick == "L") || ($nick == "chanserv")} { return 0 }
putquick "MODE $chan +b *!*@[lindex [split $uhost @] 1]"
putquick "KICK $chan $nick :$deopkickreason"
putlog "\002 $nick BAN N KICKED FROM $chan FOR DEOPING ME ON $chan"
}
if {($punish == 3)} {
putquick "MODE $chan -o $nick"
putlog "\002$nick DEOPED FOR DEOPING ME ON $chan"
 }

proc evnt:init-server {type} {
global idnick idpass
putquick "PRIVMSG $idnick :IDENTIFY $idpass"
}

putlog "=- \002DEOP PROTECTION BY RANA USMAN (www.ranausman.tk) LOADED SUCCESSFULLY \002 -="



(Edit: I have changed my code to the above and hopefully it is a little closer to what should be! But now the script loads but wont perform the function required of it.)

My addition to the base code is:
Code:
proc evnt:init-server {type} {
global idnick idpass
putquick "PRIVMSG $idnick :IDENTIFY $idpass"
}

I also added the two set's idnick and idpass hoping to make it so that you can set those variables from the top in configuration.

I am so new to this code stuff that I am hoping that I even have the brackets in the right place Smile Thank you and please dont flame me here I have racked my brain for hours on this one, and I am just hoping to take some knowledge away from this experience. Thanks again...[/quote]
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Jan 27, 2007 8:31 am    Post subject: Reply with quote

You didn't say what the problem actually is; is your bot not identifying or what?
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
chadrt
Voice


Joined: 19 Mar 2006
Posts: 33

PostPosted: Sun Jan 28, 2007 11:31 am    Post subject: Reply with quote

No it would not identify and it would shoot errors like cannot read $variable and the like. I got frustrated enough to leave it alone for awhile and use a different method. I still need to get the script working though, if you can help that would be great! Thanks a bunch...
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Jan 28, 2007 11:33 am    Post subject: Reply with quote

Why not just use a different Tcl, there are a lot of Tcl scripts that auto identify your bot and more. I can suggest Chanservneed.tcl by De Kus.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
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