
#Dalnet Gainops by Diktatorn <astehn@worlonline.se>
#This script was made upon request, since many people still havent figured out how to change their 
#existing scripts, the configuration is pretty straight forward and if you dont understand it you 
#probably shouldnt fiddle arounde with scripts anyways =), the script only supports 1 chan sofar but
#if people want multichan support or has any other ideas just drop me a mail.
#This script is just a small part of an upcoming DALnetServices Script with loads of features, so watch
#out for that one instead, coming to a tcl archive near you soon
 

#  the following 3 lines are the only things you have to set by hand

set channame "yourcoolchan"
set nickpass "yourcoolbotpassword"
set eggnick "yourcoolbotnick"

# No need to edit these if you are on DALnet

set nickserv "nickserv@services.dal.net"
set chanserv "chanserv@services.dal.net"
set memoserv "memoserv@services.dal.net"

# End of Configuration

bind notc - "*This nick is owned by someone else*" ident_nickserv
bind notc - "*Password accepted for*" op_chanserv
bind notc - "*You have*" rm_memos

proc ident_nickserv { nick uhost hand args } {
 global eggnick nickpass nickserv
    putlog "Catched notice from $nickserv"
    putserv "PRIVMSG $nickserv :identify $nickpass"
    putlog "Trying to Negotiate With $nickserv"
  }

proc op_chanserv { nick uhost hand args } {
   global eggnick chanserv channame
     putlog "Catched Notice from $chanserv"
     putserv "PRIVMSG $chanserv :OP $channame $eggnick"
     putlog "Trying to gain ops in $channame from $chanserv"
}

proc rm_memos { nick uhost hand args } {
   global eggnick memoserv
     putlog "Catched Memo Notice from $memoserv"
     putserv "PRIVMSG $memoserv :DEL ALL"
     putlog "Trying to remove memos"
}


putlog "DalServ Script by Diktatorn loaded........................."
