| View previous topic :: View next topic |
| Author |
Message |
i.m.offline Halfop
Joined: 02 Mar 2006 Posts: 74
|
Posted: Sat Sep 02, 2006 9:35 am Post subject: Deop Script |
|
|
| Dear Friends, I was wondering if I can get a code which does something like "Once the Bot gets OPed by chanserv/any other OP - (+v-o Bot BOt) voice & deop itself in specified channel. Thx in advance. |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sat Sep 02, 2006 12:19 pm Post subject: |
|
|
| Code: |
bind mode - +o foo
proc foo {n u h c m v} {
if {[string eq -noc $v $::botnick]} {
putserv "mode $c -o+v $::botnick $::botnick"
}
}
|
_________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
i.m.offline Halfop
Joined: 02 Mar 2006 Posts: 74
|
Posted: Sat Sep 02, 2006 1:26 pm Post subject: |
|
|
| demond wrote: | | Code: |
bind mode - +o foo
proc foo {n u h c m v} {
if {[string eq -noc $v $::botnick]} {
putserv "mode $c -o+v $::botnick $::botnick"
}
}
|
|
thx for the response, just wondering where can I define the channel where bot should deop itself? like I dont want it to deop in all the channels but only specified channels |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sat Sep 02, 2006 2:17 pm Post subject: |
|
|
| Code: |
bind mode - {#yourchan +o} foo
proc foo {n u h c m v} {
if {[isbotnick $v]} {
putserv "mode $c -o+v $v $v"
}
}
|
_________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
i.m.offline Halfop
Joined: 02 Mar 2006 Posts: 74
|
Posted: Sun Sep 03, 2006 1:48 am Post subject: |
|
|
Thanks a lot for your kind response Demond its really so nice of u
I will test the code n give feedback.
Sorry to ask for much but can I add more than one channel in it? if yes then how :s
Code is really working like charm thx once again |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Sep 03, 2006 2:02 am Post subject: |
|
|
| Code: |
bind mode - {#yourchan +o} foo
bind mode - {#yourotherchan +o} foo
proc foo {n u h c m v} {
if {[isbotnick $v]} {
putserv "mode $c -o+v $v $v"
}
}
|
_________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
i.m.offline Halfop
Joined: 02 Mar 2006 Posts: 74
|
Posted: Sun Sep 03, 2006 4:59 am Post subject: |
|
|
thx mate
now surprisingly I dont know why but bot doesn't deop itself when it joins the channel and gets OPed. it only deops if later on OPed by some1 or Chanserv. what could be the problem :s |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Sep 03, 2006 6:05 am Post subject: |
|
|
| i.m.offline wrote: | thx mate
now surprisingly I dont know why but bot doesn't deop itself when it joins the channel and gets OPed. |
opped by whom? possibly because the op is not seen as it happens before join sync is completed _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
i.m.offline Halfop
Joined: 02 Mar 2006 Posts: 74
|
Posted: Sun Sep 03, 2006 9:09 am Post subject: |
|
|
| as soon as BOT joins the channel, it gets oped by Chanserv on DALnet and it doesn't Deop itself. Later if I OP the BOT using Chanserv or myself. it does Deop itself. Wonder whats wrong :s |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Sun Sep 03, 2006 11:34 am Post subject: |
|
|
| Surely if it is your bot you can just remove the OP rights from chanserv (no idea how it actually works) and change it to voice. |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sun Sep 03, 2006 7:36 pm Post subject: |
|
|
| metroid wrote: | | Surely if it is your bot you can just remove the OP rights from chanserv (no idea how it actually works) and change it to voice. |
| Code: | | /cs deop #chan <nick> |
_________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Mon Sep 04, 2006 1:27 am Post subject: |
|
|
| i.m.offline wrote: | | as soon as BOT joins the channel, it gets oped by Chanserv on DALnet and it doesn't Deop itself. Later if I OP the BOT using Chanserv or myself. it does Deop itself. Wonder whats wrong :s |
try this, let me know if it works:
| Code: |
bind mode - {#yourchan +o} foo
bind mode - {#yourotherchan +o} foo
proc foo {n u h c m v} {
if {[isbotnick $v]} {
putserv "mode $c -o+v $v $v"
}
}
bind raw - 366 bar
proc bar {f k t} {
foreach {v c} [split $t] {break}
putserv "mode $c -o+v $v $v"
}
|
_________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
i.m.offline Halfop
Joined: 02 Mar 2006 Posts: 74
|
Posted: Sat Sep 16, 2006 2:54 pm Post subject: |
|
|
| Sorry to say but it deop itself from all the channel and not only specified channel. :s |
|
| Back to top |
|
 |
i.m.offline Halfop
Joined: 02 Mar 2006 Posts: 74
|
Posted: Mon Sep 18, 2006 6:37 am Post subject: |
|
|
| Demond, u around mate. the code u pasted is working but it deops itself from all the channel. please have a look at it once :s thx |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Tue Sep 19, 2006 3:23 am Post subject: |
|
|
It's because while demond made the binds right, when the eggdrop recieves 366 it will deop itself regardless of the channel.
Try to modify it yourself instead of asking others to do everything for them.
Also as i said before, why don't you just take the bots chanserv rights away? |
|
| Back to top |
|
 |
|