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 

Chatspace Identifier {Help Me}
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
minted
Halfop


Joined: 20 Jul 2005
Posts: 64

PostPosted: Wed Feb 01, 2006 1:06 am    Post subject: Reply with quote

*bump*?
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Feb 03, 2006 1:24 pm    Post subject: Reply with quote

It's not that long, but can be tweaked a little bit.
Code:
set password ""

bind raw - NOTICE notice_bnc

proc notice_bnc {from keyword arg} {
 global password
 if {[lindex [split [set arg [string tolower $arg]]] 0] == "auth" ||
[string tolower $from] == "my.server.here"} {
  set bnc_notice [join [lrange [split $arg] 1 end]]
  if {[string match "*type /pass password*" $bnc_notice]} {
    putserv "PASS $password"
  }
 }
}

_________________
Follow me on GitHub

- Opposing

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


Joined: 20 Jul 2005
Posts: 64

PostPosted: Fri Feb 03, 2006 9:02 pm    Post subject: Reply with quote

thanks Smile

i was hoping to use the raw for this though.
now, im a 100% newb at tcl, and haven't even tried to code with it before now.
but i made a naive attempt
i dont have the ability to test it atm though
think this will work?
Code:
set nickpass "password"

bind raw - 512 identify:nick

proc identify:nick {from key arg} {
 putserv "PASS $nickpass"
}


i dont want to take any other factors into account, not nickname, server, etc
just in all cases, when the bot gets raw 512, do /pass password
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Feb 04, 2006 9:07 am    Post subject: Reply with quote

I don't see why it shouldn't work, gets raw 512 and identifies. You can do some tests by adding a line:
Code:
putlog "$from :: $key :: $arg"

to know what id being sent and match upon that (if you want to take anything into consideration).
_________________
Follow me on GitHub

- Opposing

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


Joined: 20 Jul 2005
Posts: 64

PostPosted: Sat Feb 04, 2006 3:06 pm    Post subject: Reply with quote

ok i tested that, it actually sent the nickpass, but i got an error with it
Code:
[13:57] chat.wiredreality.net :: 512 :: ChatBot :Authorization required to use Registered Nickname ChatBot
[13:57] Tcl error [identify:nick]: can't read "nickpass": no such variable

set errorInfo
Currently: can't read "nickpass": no such variable
Currently: while executing
Currently: "putserv "PASS $nickpass""
Currently: (procedure "identify:nick" line 2)
Currently: invoked from within
Currently: "identify:nick $_raw1 $_raw2 $_raw3"
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Feb 04, 2006 6:27 pm    Post subject: Reply with quote

That because nickpass is not global in the proc. Either add
Code:
global nickpass

in the proc or use $::nickpass instead of $nickpass.
_________________
Follow me on GitHub

- Opposing

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


Joined: 20 Jul 2005
Posts: 64

PostPosted: Sat Feb 04, 2006 9:09 pm    Post subject: Reply with quote

thanks Very Happy
works perfect
Back to top
View user's profile Send private message
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