| View previous topic :: View next topic |
| Author |
Message |
minted Halfop
Joined: 20 Jul 2005 Posts: 64
|
Posted: Sun May 21, 2006 9:07 pm Post subject: make bot op self on chan join |
|
|
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 |
|
 |
whittinghamj Op
Joined: 21 May 2006 Posts: 103
|
Posted: Mon May 22, 2006 12:55 am Post subject: |
|
|
i will try and find the one i wrote.
but its an svsjoin command. |
|
| Back to top |
|
 |
whittinghamj Op
Joined: 21 May 2006 Posts: 103
|
Posted: Mon May 22, 2006 12:57 am Post subject: |
|
|
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 |
|
 |
minted Halfop
Joined: 20 Jul 2005 Posts: 64
|
Posted: Mon May 22, 2006 11:57 am Post subject: |
|
|
thats not what im after
we dont have sajoins or samodes or anything like that on our server.
but ur code was very helpful 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 |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Mon May 22, 2006 4:26 pm Post subject: |
|
|
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 |
|
 |
whittinghamj Op
Joined: 21 May 2006 Posts: 103
|
Posted: Tue May 23, 2006 11:11 pm Post subject: |
|
|
| glad i could help buddy. |
|
| Back to top |
|
 |
minted Halfop
Joined: 20 Jul 2005 Posts: 64
|
Posted: Thu May 25, 2006 6:59 pm Post subject: |
|
|
| caesar wrote: | | Why don't you use the 'isbotnick' thing? |
cos i dont have a clue what that is
im a newb with coding tcl
took me long enough to learn .mrc scripting.
care to help?  |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Thu May 25, 2006 7:35 pm Post subject: |
|
|
bind join - * join:op
proc join:op {n u h c t} {
putserv "MODE $chan +o $::botnick"
} |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Thu May 25, 2006 11:12 pm Post subject: |
|
|
| minted wrote: | | caesar wrote: | | Why don't you use the 'isbotnick' thing? |
cos i dont have a clue what that is
im a newb with coding tcl
took me long enough to learn .mrc scripting.
care to help?  |
Try reading tcl-commands.doc. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
sKy Op

Joined: 14 Apr 2005 Posts: 194 Location: Germany
|
Posted: Sat May 27, 2006 8:06 pm Post subject: |
|
|
| 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 |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Sat May 27, 2006 10:00 pm Post subject: |
|
|
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 |
|
 |
|