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 

make bot op self on chan join

 
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: Sun May 21, 2006 9:07 pm    Post subject: make bot op self on chan join Reply with quote

as the title says, my bots an admin, and can op itself without using any services.
i want it to auto op itself on joining every chan.
Back to top
View user's profile Send private message
whittinghamj
Op


Joined: 21 May 2006
Posts: 103

PostPosted: Mon May 22, 2006 12:55 am    Post subject: Reply with quote

i will try and find the one i wrote.

but its an svsjoin command.
Back to top
View user's profile Send private message
whittinghamj
Op


Joined: 21 May 2006
Posts: 103

PostPosted: Mon May 22, 2006 12:57 am    Post subject: Reply with quote

Here you go buddy

it was svjoin not svsjoin but blah - i am tired.

Code:
bind join - * svjoin
proc svjoin {nick uhost hand chan} {
 global botnick
    if { $nick == $botnick } {
        putquick "samode $chan +o $botnick"
    }
}


your bot MUST be ircop'd first for this to work.
Back to top
View user's profile Send private message
minted
Halfop


Joined: 20 Jul 2005
Posts: 64

PostPosted: Mon May 22, 2006 11:57 am    Post subject: Reply with quote

thats not what im after
we dont have sajoins or samodes or anything like that on our server.

but ur code was very helpful Smile thank you.
i worked it out from there.

Code:
bind join - * opself
proc opself {nick uhost hand chan} {
 global botnick
    if { $nick == $botnick } {
        putquick "mode $chan +o $botnick"
    }
}


does this look cool? it works, so im not complaining
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Mon May 22, 2006 4:26 pm    Post subject: Reply with quote

Why don't you use the 'isbotnick' thing?
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
whittinghamj
Op


Joined: 21 May 2006
Posts: 103

PostPosted: Tue May 23, 2006 11:11 pm    Post subject: Reply with quote

glad i could help buddy.
Back to top
View user's profile Send private message
minted
Halfop


Joined: 20 Jul 2005
Posts: 64

PostPosted: Thu May 25, 2006 6:59 pm    Post subject: Reply with quote

caesar wrote:
Why don't you use the 'isbotnick' thing?

cos i dont have a clue what that is Embarassed
im a newb with coding tcl
took me long enough to learn .mrc scripting.

care to help? Smile
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Thu May 25, 2006 7:35 pm    Post subject: Reply with quote

bind join - * join:op

proc join:op {n u h c t} {
putserv "MODE $chan +o $::botnick"
}
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Thu May 25, 2006 11:12 pm    Post subject: Reply with quote

minted wrote:
caesar wrote:
Why don't you use the 'isbotnick' thing?

cos i dont have a clue what that is Embarassed
im a newb with coding tcl
took me long enough to learn .mrc scripting.

care to help? Smile

Try reading tcl-commands.doc.
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
sKy
Op


Joined: 14 Apr 2005
Posts: 194
Location: Germany

PostPosted: Sat May 27, 2006 8:06 pm    Post subject: Reply with quote

DragnLord wrote:
bind join - * join:op

proc join:op {n u h c t} {
putserv "MODE $chan +o $::botnick"
}


Not very wise without the if check. The bot will send eachtime a message to the server if anyone joins. How the bot can op itself? It`s a ircop?
_________________
socketapi | Code less, create more.
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Sat May 27, 2006 10:00 pm    Post subject: Reply with quote

darn good point, this "should" be sufficiant for check
Code:
bind join - * join:op

proc join:op {n u h c t} {
  if {[isbotnick $n]}{
    putserv "MODE $chan +o $::botnick"
  }
}


minted stated that the bot is opered
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
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