Code: Select all
#################################################################
# Azzurra #
# Script per il network DALnet #
# #
# Written by IRC Club Staff (SerialCRACK) #
# Managed by Sir_Fz #
#################################################################
### SETS
set identified 0
set CS_no_access 0
# Imposta qui la password del nick del bot.
# N.B.: E' obbligatorio registrare il nick se si vuole usare
# questo script ed il bot deve essere almeno VOp nel canale.
set NS_pass ""
### BINDS
bind evnt - init-server init_NS_id
bind notc S "*This nick is owned by someone else.*" NS:ided
bind notc S "*is incorrect." CS:no_access
bind need - "* invite" azzurra:invite
bind need - "* unban" azzurra:unban
bind need - "* op" azzurra:op
if {![info exists NS:pass]} {die "TCL (Azzurra.tcl (E' necessario registrare il nick per poter usare questo script.))"}
adduser NickServ NickServ!service@dal.net
adduser ChanServ ChanServ!service@dal.net
chattr NickServ -hp+fS
chattr ChanServ -hp+fS
### PROCS
proc init_NS_id {type} {NS:id}
proc NS:id {} {
global NS_pass
putserv "PRIVMSG NickServ@services.dal.net :identify $NS_pass"
}
proc NS:ided {nick host hand text dest} {set identified 1}
proc CS:no_access {nick host hand text dest} {set CS_no_access 1}
proc azzurra:invite {chan type} {
global identified
if {$identified == 1} {
putlog "Tento di invitarmi sul canale $chan tramite ChanServ."
putquick "PRIVMSG ChanServ@services.dal.net :invite $chan"
putserv "JOIN $chan"
} else {NS:id}
}
proc azzurra:unban {chan type} {
global identified
if {$identified == 1} {
putlog "Tento di rimuovermi il ban su $chan tramite ChanServ."
putquick "PRIVMSG ChanServ@services.dal.net :unban $chan me"
putserv "JOIN $chan"
} else {NS:id}
}
proc azzurra:op {chan type} {
global identified CS_no_access botnick
if {$identified == 1} {
if {$CS_no_access == 0} {
putlog "Tento di riprendermi l'op su $chan tramite ChanServ."
putquick "PRIVMSG ChanServ@services.dal.net :op $chan $botnick"
} else {putlog "Non è possibile riprendere l'op su $chan : \"Accesso negato\"."}
} else {set CS_no_access 0 ; NS:id}
}
putlog "TCL Script: Azzurra for DALnet v1.0 created by IRC managed by Sir_Fz Club Staff - http://irc-club.6go.net"
and when i loaded tcl script and typed .rehash into, bot msg me that and died#################################################################
# Azzurra #
# Script per il network DALnet #
# #
# Written by IRC Club Staff (SerialCRACK) #
# Managed by Sir_Fz #
#################################################################
### SETS
set identified 0
set CS_no_access 0
# Imposta qui la password del nick del bot.
# N.B.: E' obbligatorio registrare il nick se si vuole usare
# questo script ed il bot deve essere almeno VOp nel canale.
set NS_pass "ircsandzak960081"
### BINDS
bind evnt - init-server init_NS_id
bind notc S "*This nick is owned by someone else.*" NS:ided
bind notc S "*is incorrect." CS:no_access
bind need - "* invite" azzurra:invite
bind need - "* unban" azzurra:unban
bind need - "* op" azzurra:op
if {![info exists NS:pass]} {die "TCL (Azzurra.tcl (E' necessario registrare il nick per poter usare questo script.))"}
adduser NickServ NickServ!service@dal.net
adduser ChanServ ChanServ!service@dal.net
chattr NickServ -hp+fS
chattr ChanServ -hp+fS
### PROCS
proc init_NS_id {type} {NS:id}
proc NS:id {} {
global NS_pass
putserv "PRIVMSG NickServ@services.dal.net :identify Sandzak $NS_pass"
}
proc NS:ided {nick host hand text dest} {set identified 1}
proc CS:no_access {nick host hand text dest} {set CS_no_access 1}
proc azzurra:invite {chan type} {
global identified
if {$identified == 1} {
putlog "Pokusavam da invajtujem sebe na $chan preko Chanserv-a."
putquick "PRIVMSG ChanServ@services.dal.net :invite $chan"
putserv "JOIN $chan"
} else {NS:id}
}
proc azzurra:unban {chan type} {
global identified
if {$identified == 1} {
putlog "Pokusavam da Izbrisem ban na $chan preko Chanserv-a."
putquick "PRIVMSG ChanServ@services.dal.net :unban $chan me"
putserv "JOIN $chan"
} else {NS:id}
}
proc azzurra:op {chan type} {
global identified CS_no_access botnick
if {$identified == 1} {
if {$CS_no_access == 0} {
putlog "Pokusavam da se opnem preko ChanServ-a."
putquick "PRIVMSG ChanServ@services.dal.net :op $chan $botnick"
} else {putlog "Nemoguce je dobit op od Chanserva : \"Access Denied\"."}
} else {set CS_no_access 0 ; NS:id}
}
putlog "TCL Script: Azzurra for DALnet v1.0 created by IRC managed by Sir_Fz Club Staff - http://irc-club.6go.net"
### bot unbans him self if he is op
bind mode -|- "* +b" ban:check
# Catches all bans
proc ban:check { nick address handle channel mode victim } {
if { [string match [string tolower $victim] [string tolower "$botnick!$botname"]] } {
# If the bot was banned...
pushmode $channel -o $nick
pushmode $channe -b $victim
# Deop the user & unban
}
}
any ide why this happend?*** BOT SHUTDOWN (TCL (Azzurra.tcl (E' necessario registrare il nick per poter usare questo script.)))
[21:43:45] <bot> [12:38] * TCL (Azzurra.tcl (E' necessario registrare il nick per poter usare questo script.))
[21:43:45] <bot> [17] Chat closed
Code: Select all
if {![info exists NS:pass]} {die "TCL (Azzurra.tcl (E' necessario registrare il nick per poter usare questo script.))"}
Code: Select all
if {![info exists NS_pass]} {die "TCL (Azzurra.tcl (E' necessario registrare il nick per poter usare questo script.))"}
proc azzurra:invite {chan type} {
global identified
if {$identified == 1} {
putlog "Pokusavam da invajtujem sebe na $chan preko Chanserv-a."
putquick "PRIVMSG ChanServ@services.dal.net :invite $chan"
putserv "JOIN $chan"
} else {NS:id}
}
and then there is something wrong there too?Tcl error [ban:check]: can't read "botnick": no such variable
### bot unbans him self if he is op
bind mode -|- "* +b" ban:check
# Catches all bans
proc ban:check { nick address handle channel mode victim } {
if { [string match [string tolower $victim] [string tolower "$botnick!$botname"]] } {
# If the bot was banned...
pushmode $channel -o $nick
pushmode $channe -b $victim
# Deop the user & unban
}
}
Code: Select all
# What user and password should the eggdrop use to loign to NickServ?
set dalnet(stuff) "user password"
#
###
#### Done with configurations, do not edit past here unless you know TCL!
###
#
# binds #
bind mode - "* +b" my:channel:ban
##
# user/pass?
if {[llength $dalnet(stuff)] == 2} {
bind evnt - init-server my:connect
bind notc f "*is incorrect." oups:no:access
bind notc f "This nick is owned by someone else. Please choose another." ns:my:login
bind need - * cs:my:needs
}
##
# services?
if {![validuser Services]} {
adduser Services
setuser Services HOSTS NickServ!service@dal.net
setuser Services HOSTS ChanServ!service@dal.net
chattr Services -hp+f
putlog "Added ChanServ and NickServ to user Services."
}
##
# connect login
proc my:connect init-server {
putquick "PRIVMSG X@channels.undernet.org :login [lindex $::x(stuff) 0] [lindex $::x(stuff) 1]" -next
putquick "MODE $::botnick +x" -next
}
##
# relogin
proc ns:my:login {nick uhost hand text dest} {
if {[lindex [split $dest "@"] 0] != $::botnick} {
return
}
putquick "PRIVMSG NickServ@services.dal.net :identify [lindex $::dalnet(stuff) 0] [lindex $::dalnet(stuff) 1]" -next
}
##
# something wrong
proc oups:no:access {nick uhost hand text dest} {
if {[lindex [split $dest "@"] 0] != $::botnick} {
return
}
putlog "\002Warning!\002 There is something wrong with my user/password cos I can't login to NickServ.. ;("
}
##
# channel ban
proc channel:ban {nick uhost hand chan mc ban} {
if {![botisop $chan] || ![string match "$ban" "$::botname"]} {
return
}
putquick "MODE $chan -bo $ban $nick" -next
}
##
# ChanServ needs
proc cs:my:needs {channel type} {
switch -- [strlwr $type] {
"op" {
if {![onchan ChanServ $channel]} {
return 1
}
putserv "PRIVMSG ChanServ@services.dal.net :op $channel"
return 1
}
"unban" {
putserv "PRIVMSG ChanServ@services.dal.net :unban $channel"
return 1
}
"invite" {
putserv "PRIVMSG ChanServ@services.dal.net :invite $channel"
return 1
}
"limit" {
putserv "PRIVMSG ChanServ@services.dal.net :invite $channel"
return 1
}
}
}
putlog "dalnet.tcl.. loaded."
1) when I Deoped Him he didn't oped him self again using Chanserv[15:52:47] *** Doom sets mode: -o Bot
[15:53:00] *** Doom sets mode: +o Bot
-
[15:53:26] *** Bot was kicked by Doom
[15:53:26] *** Doom sets mode: +b *!*identd@free.host.org
[15:53:40] *** Doom sets mode: -b *!*identd@free.host.org
-
[15:54:19] *** Doom sets mode: +l 5
[15:54:23] *** Bot was kicked by Doom
[15:54:40] *** Doom sets mode: -l
-
[16:01:35] *** Doom sets mode: +i
[16:01:48] *** Bot was kicked by Doom
[16:02:14] *** Doom sets mode: -i
This was the errors i got in Dcc Chat when i was testing bot[15:50:14] <(Sandzak> [06:40] Tcl error [my:channel:ban]: invalid command name "my:channel:ban"
[15:53:06] <(Sandzak> [06:42] Tcl error [my:channel:ban]: invalid command name "my:channel:ban"
Code: Select all
proc channel:ban {nick uhost hand chan mc ban} {
Code: Select all
proc my:channel:ban {nick uhost hand chan mc ban} {
yeah i've set "set dalnet(stuff) "user password" " to my bots passwd# What user and password should the eggdrop use to loign to NickServ?
set dalnet(stuff) "user password"
Can you explain this? should this be set to " if {![onchan ChanServ $channel]} {# ChanServ needs
proc cs:my:needs {channel type} {
switch -- [strlwr $type] {
"op" {
if {![onchan ChanServ $channel]} {
return 1
Code: Select all
"op" {
putserv "msg chanserv@services.dal.net :op $channel $botnick"
return 1
}
"unban" {
putserv "MSG ChanServ@services.dal.net :unban $channel"
return 1
}
"invite" {
putserv "MSG ChanServ@services.dal.net :invite $channel $botnick"
return 1
}
"limit" {
putserv "MSG ChanServ@services.dal.net :invite $channel $botnick"
return 1
}
}
}