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 

Reop on deop script

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Fri Jun 06, 2008 3:21 am    Post subject: Reop on deop script Reply with quote

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.
Back to top
View user's profile Send private message
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Fri Jun 06, 2008 9:50 am    Post subject: Reply with quote

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

Code:
#----------------------------------------------------------------------------------------------------------------------#
#                                           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.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Mon Jun 09, 2008 3:21 am    Post subject: Reply with quote

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

Code:
#----------------------------------------------------------------------------------------------------------------------#
#                                           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 Wink

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:
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 !
Back to top
View user's profile Send private message
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Mon Jun 09, 2008 3:33 am    Post subject: Reply with quote

hmm the Bot reoped itself after 10 minutes, but the user wasn't kicked, ok it doesn't matter...the main function is working!
Back to top
View user's profile Send private message
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Wed Jun 11, 2008 5:16 pm    Post subject: Reply with quote

Code:
#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:

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


for


Code:
utimer 1800 [list putserv "PRIVMSG $servicenick :op $chan $botnick"]
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Fri Jun 13, 2008 3:16 am    Post subject: Reply with quote

I've set punish to 1 !!!
ok, thanks Nor7on with the time reop...
Back to top
View user's profile Send private message
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Fri Jun 13, 2008 8:41 am    Post subject: Reply with quote

ohh i see.

look.

Code:

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:
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.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Mon Jun 16, 2008 4:38 am    Post subject: Reply with quote

Thanks Nor7on...I'm too lazy to test it, but I think it's ok Smile
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