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.

Reop on deop script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Reop on deop script

Post by eXtremer »

I need script that will op my Bot when it's deoped.
But I don't want to create a op/deop flood on the chan.
The script should have some options, for example if deoped twice the bot
will not ask X fo reop, or if deoped by X (ChanServ) the bot will not reop itself or will try reoping itself in about 30 minutes.

I've tried Search nothing found, just awyeah ChanServ Auto Reop Script, but it doesn't work on Undernet.

Waiting for reply, thanks in advance.
User avatar
Nor7on
Op
Posts: 185
Joined: Sat Mar 03, 2007 8:05 am
Location: Spain - Barcelona
Contact:

Post by Nor7on »

If ur eggdrop is deoped, ur bot them of 10min request Op to X (bot undernet).

Code: Select all

#----------------------------------------------------------------------------------------------------------------------#
#                                           AUTO REOP SCRIPT BY RANA USMAN                                             #
#----------------------------------------------------------------------------------------------------------------------#
#ALLAH IS GREATEST
#Salam O Aleikum n Hiya!, Purpose of writing this script is , if someone deop your Bot it will get OP automatically Using 
#Network Services only if bot have access to that channel where it is deoped.There is option for you to set the nick of 
#Service manually.Before there are some scripts available but they do only work for Dalnet or the services having Chanserv
#as nick.But in this script you have option to set the services nick.
#This script works on all the channels where bot is parked

#AUTHOR : Rana Usman 
#Email : coolguy_rusman@yahoo.com
#URL : www.ranausman.tk or www.airevision.tk
#If you have any suggesstion about my script kindly tell me i will be glad to look forward thank you
#Version : 1.2 
                                                                                                                                                                                                                                         
## History 
# Before the bot used to ban the services IP if they deop bot but it is fixed now 
# Thanks to Riderz for reporting bug                                                                                                                            
                                                                                                                          
####################################
#- CONFIGURATION STARTS FROM HERE -# 
####################################

####################
# SET SERVICE NICK #
####################
#Set Service Nick Here means the Network Official Bot, like Undernet's Bot Nick is X 
#FOR UNDERNET USE NICK : X
#FOR DALNET USE : chanserv@services.dal.net
#FOR QUAKENET USE : Q or L (depends what bot you have on your Channel)
#FOR NETWORK HAVING SERVICES LIKE Nickserv and Chanserv Use : CHANSERV

set servicenick "X"

##################
# SET PUNISHMENT #
##################

#You have Four options Use 0,1,2 or 3
#Set it as '0' If you dont want bot to take any action against the user which deoped your bot
#Set it as '1' If you want Bot to KICK the user who deoped your bot 
#Set it as '2' If you want Bot to KICK n BAN the User who deoped your bot
#Set it as '3' If you want Bot to DEOP the user who deoped your bot

set punish "0"

###################
# SET KICK REASON #
###################

#Set Reason here In Case you set the upper Option as 1 or 2 
#::REMEMBER::  BOT will only kick if the SET PUNISHMENT OPTION IS SET TO 1 or 2

set deopkickreason "12{Anti Deop Protection} 5Kindly Dont Deop Me Next Time"

###########################
# CONFIGURATION ENDS HERE #
###########################

#--------------------------------------------------------------------------------------------------------------------#
#   SCRIPT STARTS FROM HERE...MAKE IT BETTER WITH YOUR SKILLS IF YOU CAN.I DONT RESTRICT YOU TO NOT TO TOUCH CODE!   #
#--------------------------------------------------------------------------------------------------------------------#

bind mode - "*-*o*" RanaUsman:autoreop
proc RanaUsman:autoreop {nick uhost hand chan mode target} {
global botnick servicenick punish deopkickreason
if {($target == $botnick) && ($nick != $botnick)} {
if {($nick == "X") || ($nick == "Q") || ($nick == "L") || ($nick == "chanserv")} { return 0 }
putlog "\002BOT DEOPED ON $chan by $nick"
putlog "\002REOPING BOT ON $chan"
utimer 600 [list putserv "PRIVMSG $servicenick :op $chan $botnick"]
putlog "\002REOP SUCCESSFULL"
utimer 2 [list RanaUsman:punish $nick $uhost $chan] 
 }
}
proc RanaUsman:punish {nick uhost chan} {
global punish deopkickreason
if {($punish == 0)} { return 0 }
if {($punish == 1)} { 
if {($nick == "X") || ($nick == "Q") || ($nick == "L") || ($nick == "chanserv")} { return 0 }
putquick "KICK $chan $nick :$deopkickreason"
putlog "\002$nick Kicked from $chan for Deoping me on $chan "
 }
if {($punish == 2)} { 
if {($nick == "X") || ($nick == "Q") || ($nick == "L") || ($nick == "chanserv")} { return 0 }
putquick "MODE $chan +b *!*@[lindex [split $uhost @] 1]"
putquick "KICK $chan $nick :$deopkickreason"
putlog "\002 $nick BAN N KICKED FROM $chan FOR DEOPING ME ON $chan"
}
if {($punish == 3)} { 
putquick "MODE $chan -o $nick"
putlog "\002$nick DEOPED FOR DEOPING ME ON $chan"
 }
} 
############################################################################################
putlog "=- \002DEOP PROTECTION BY RANA USMAN (www.ranausman.tk) LOADED SUCCESSFULLY \002 -="
############################################################################################

try.
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Post by eXtremer »

Nor7on wrote:If ur eggdrop is deoped, ur bot them of 10min request Op to X (bot undernet).

Code: Select all

#----------------------------------------------------------------------------------------------------------------------#
#                                           AUTO REOP SCRIPT BY RANA USMAN                                             #
#----------------------------------------------------------------------------------------------------------------------#
#ALLAH IS GREATEST
#Salam O Aleikum n Hiya!, Purpose of writing this script is , if someone deop your Bot it will get OP automatically Using 
#Network Services only if bot have access to that channel where it is deoped.There is option for you to set the nick of 
#Service manually.Before there are some scripts available but they do only work for Dalnet or the services having Chanserv
#as nick.But in this script you have option to set the services nick.
#This script works on all the channels where bot is parked

#AUTHOR : Rana Usman 
#Email : coolguy_rusman@yahoo.com
#URL : www.ranausman.tk or www.airevision.tk
#If you have any suggesstion about my script kindly tell me i will be glad to look forward thank you
#Version : 1.2 
                                                                                                                                                                                                                                         
## History 
# Before the bot used to ban the services IP if they deop bot but it is fixed now 
# Thanks to Riderz for reporting bug                                                                                                                            
                                                                                                                          
####################################
#- CONFIGURATION STARTS FROM HERE -# 
####################################

####################
# SET SERVICE NICK #
####################
#Set Service Nick Here means the Network Official Bot, like Undernet's Bot Nick is X 
#FOR UNDERNET USE NICK : X
#FOR DALNET USE : chanserv@services.dal.net
#FOR QUAKENET USE : Q or L (depends what bot you have on your Channel)
#FOR NETWORK HAVING SERVICES LIKE Nickserv and Chanserv Use : CHANSERV

set servicenick "X"

##################
# SET PUNISHMENT #
##################

#You have Four options Use 0,1,2 or 3
#Set it as '0' If you dont want bot to take any action against the user which deoped your bot
#Set it as '1' If you want Bot to KICK the user who deoped your bot 
#Set it as '2' If you want Bot to KICK n BAN the User who deoped your bot
#Set it as '3' If you want Bot to DEOP the user who deoped your bot

set punish "0"

###################
# SET KICK REASON #
###################

#Set Reason here In Case you set the upper Option as 1 or 2 
#::REMEMBER::  BOT will only kick if the SET PUNISHMENT OPTION IS SET TO 1 or 2

set deopkickreason "12{Anti Deop Protection} 5Kindly Dont Deop Me Next Time"

###########################
# CONFIGURATION ENDS HERE #
###########################

#--------------------------------------------------------------------------------------------------------------------#
#   SCRIPT STARTS FROM HERE...MAKE IT BETTER WITH YOUR SKILLS IF YOU CAN.I DONT RESTRICT YOU TO NOT TO TOUCH CODE!   #
#--------------------------------------------------------------------------------------------------------------------#

bind mode - "*-*o*" RanaUsman:autoreop
proc RanaUsman:autoreop {nick uhost hand chan mode target} {
global botnick servicenick punish deopkickreason
if {($target == $botnick) && ($nick != $botnick)} {
if {($nick == "X") || ($nick == "Q") || ($nick == "L") || ($nick == "chanserv")} { return 0 }
putlog "\002BOT DEOPED ON $chan by $nick"
putlog "\002REOPING BOT ON $chan"
utimer 600 [list putserv "PRIVMSG $servicenick :op $chan $botnick"]
putlog "\002REOP SUCCESSFULL"
utimer 2 [list RanaUsman:punish $nick $uhost $chan] 
 }
}
proc RanaUsman:punish {nick uhost chan} {
global punish deopkickreason
if {($punish == 0)} { return 0 }
if {($punish == 1)} { 
if {($nick == "X") || ($nick == "Q") || ($nick == "L") || ($nick == "chanserv")} { return 0 }
putquick "KICK $chan $nick :$deopkickreason"
putlog "\002$nick Kicked from $chan for Deoping me on $chan "
 }
if {($punish == 2)} { 
if {($nick == "X") || ($nick == "Q") || ($nick == "L") || ($nick == "chanserv")} { return 0 }
putquick "MODE $chan +b *!*@[lindex [split $uhost @] 1]"
putquick "KICK $chan $nick :$deopkickreason"
putlog "\002 $nick BAN N KICKED FROM $chan FOR DEOPING ME ON $chan"
}
if {($punish == 3)} { 
putquick "MODE $chan -o $nick"
putlog "\002$nick DEOPED FOR DEOPING ME ON $chan"
 }
} 
############################################################################################
putlog "=- \002DEOP PROTECTION BY RANA USMAN (www.ranausman.tk) LOADED SUCCESSFULLY \002 -="
############################################################################################

try.
Thanks Nor7on ;)

But if I want to change it to 5 or 30 minutes
I don't understand in minutes or seconds the script is working

Code: Select all

utimer 600 [list putserv "PRIVMSG $servicenick :op $chan $botnick"]
putlog "\002REOP SUCCESSFULL"
utimer 2 [list RanaUsman:punish $nick $uhost $chan] 
I've tested the script 1 min ago, it's not working, in partyline the bot is saying:

[10:19] BOT DEOPED ON #Drochia by tester`
[10:19] REOPING BOT ON #Drochia
[10:19] REOP SUCCESSFULL
[10:19] tester` Kicked from #Drochia for Deoping me on #Drochia

But on the chan nothin` happens, no reop & no kick !
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Post by eXtremer »

hmm the Bot reoped itself after 10 minutes, but the user wasn't kicked, ok it doesn't matter...the main function is working!
User avatar
Nor7on
Op
Posts: 185
Joined: Sat Mar 03, 2007 8:05 am
Location: Spain - Barcelona
Contact:

Post by Nor7on »

Code: Select all

#You have Four options Use 0,1,2 or 3
#Set it as '0' If you dont want bot to take any action against the user which deoped your bot
#Set it as '1' If you want Bot to KICK the user who deoped your bot
#Set it as '2' If you want Bot to KICK n BAN the User who deoped your bot
#Set it as '3' If you want Bot to DEOP the user who deoped your bot

set punish "0" 
if u want kick to user deoper, change "0" to "1".

and, if u want reop every 30min

change:

Code: Select all

utimer 600 [list putserv "PRIVMSG $servicenick :op $chan $botnick"] 
putlog "\002REOP SUCCESSFULL"
for

Code: Select all

utimer 1800 [list putserv "PRIVMSG $servicenick :op $chan $botnick"] 
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Post by eXtremer »

I've set punish to 1 !!!
ok, thanks Nor7on with the time reop...
User avatar
Nor7on
Op
Posts: 185
Joined: Sat Mar 03, 2007 8:05 am
Location: Spain - Barcelona
Contact:

Post by Nor7on »

ohh i see.

look.

Code: Select all

proc RanaUsman:punish {nick uhost chan} {
global punish deopkickreason
if {($punish == 0)} { return 0 }
if {($punish == 1)} {
if {($nick == "X") || ($nick == "Q") || ($nick == "L") || ($nick == "chanserv")} { return 0 }
putquick "KICK $chan $nick :$deopkickreason"
putlog "\002$nick Kicked from $chan for Deoping me on $chan "
 } 
change for:

Code: Select all

proc RanaUsman:punish {nick uhost chan} {
global punish deopkickreason servicenick
if {($punish == 0)} { return 0 }
if {($punish == 1)} {
if {($nick == "X") || ($nick == "Q") || ($nick == "L") || ($nick == "chanserv")} { return 0 }
putserv "PRIVMSG $servicenick :KICK $chan $nick $deopkickreason"
putlog "\002$nick Kicked from $chan for Deoping me on $chan "
 } 
This code kick via X.

try.
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Post by eXtremer »

Thanks Nor7on...I'm too lazy to test it, but I think it's ok :)
Post Reply