This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Deop Script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
i
i.m.offline
Halfop
Posts: 74
Joined: Thu Mar 02, 2006 11:47 am

Deop Script

Post by i.m.offline »

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.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Code: Select all

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: Select all

 tag when posting logs, code
i
i.m.offline
Halfop
Posts: 74
Joined: Thu Mar 02, 2006 11:47 am

Post by i.m.offline »

demond wrote:

Code: Select all

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
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Code: Select all

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: Select all

 tag when posting logs, code
i
i.m.offline
Halfop
Posts: 74
Joined: Thu Mar 02, 2006 11:47 am

Post by i.m.offline »

Thanks a lot for your kind response Demond :D 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 :D thx once again
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Code: Select all

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: Select all

 tag when posting logs, code
i
i.m.offline
Halfop
Posts: 74
Joined: Thu Mar 02, 2006 11:47 am

Post by i.m.offline »

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
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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: Select all

 tag when posting logs, code
i
i.m.offline
Halfop
Posts: 74
Joined: Thu Mar 02, 2006 11:47 am

Post by i.m.offline »

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
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

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.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

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: Select all

/cs deop #chan <nick>
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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: Select all

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: Select all

 tag when posting logs, code
i
i.m.offline
Halfop
Posts: 74
Joined: Thu Mar 02, 2006 11:47 am

Post by i.m.offline »

Sorry to say but it deop itself from all the channel and not only specified channel. :s
i
i.m.offline
Halfop
Posts: 74
Joined: Thu Mar 02, 2006 11:47 am

Post by i.m.offline »

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
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

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?
Post Reply