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.

OPTools something wrong.

Support & discussion of released scripts, and announcements of new releases.
Post Reply
User avatar
Nor7on
Op
Posts: 185
Joined: Sat Mar 03, 2007 8:05 am
Location: Spain - Barcelona
Contact:

OPTools something wrong.

Post by Nor7on »

i have install this tcl. http://www.egghelp.org/cgi-bin/tcl_arch ... ad&id=1157

Code: Select all

# Simple OP commands ... like op, voice, kick, ban ... but, it uses his access to Undernet X to op , deop, etc ...
# Author : CBernetic

# De modificat

set access "Accesul la X"
set durataban "durata in ore"

# Nu modifica mai jos (doar daca stii tcl)

bind pub o .h pub:h
bind pub o .op pub:op
bind pub o .vo pub:voice
bind pub o .k pub:kick
bind pub o .b pub:ban
bind pub o .ub pub:unban
bind pub - .reguli pub:reguli
bind notc - * notice

proc pub:h {nick uhost hand chan text} {
puthelp "NOTICE $nick :Comenzi disponibile :"
puthelp "NOTICE $nick :-"
puthelp "NOTICE $nick :.op	| Se foloseste si pentru deop :: Ex. : .op $me"
puthelp "NOTICE $nick :.vo	| Se foloseste si pentru devoice :: Ex. : .vo $me"
puthelp "NOTICE $nick :.k	| Ex. : .k Lamer out"
puthelp "NOTICE $nick :.b	| Ex. : .b Lamer out"
puthelp "NOTICE $nick :.reguli	| Comanda poate fi executata si de useri obisnuiti!
puthelp "NOTICE $nick :.ub	| Ex. : .ub *!*@Lamer.users.undernet.org"
puthelp "NOTICE $nick :-"
puthelp "NOTICE $nick :OPTools (c) 2005"
}

proc pub:op {nick uhost hand chan text} {
if {[string lenght $text] > 0} {
set tnick [lindex $text 0]
if {[onchan $tnick $chan]} {
if {[isop $tnick $chan]} {
puthelp "PRIVMSG X :deop $chan $tnick"
}
else {
puthelp "PRIVMSG X:op $chan $nick"
}
}
else {
puthelp "NOTICE $nick :$tnick nu se afla pe $chan"
}
}
else {
puthelp "NOTICE $nick :Sintaxa incorecta!"
puthelp "NOTICE $nick :Folositi .op nick"
puthelp "NOTICE $nick :Ex. : .op Lamer"
}
}
}

proc pub:voice {nick uhost hand chan text} {
if {[string lenght $text] > 0} {
set tnick [lindex $text 0]
if {[onchan $tnick $chan]} {
if {[isvoice $tnick $chan]} {
puthelp "PRIVMSG X :devoice $chan $tnick"
}
else {
puthelp "PRIVMSG X :voice $chan $tnick"
}
}
else {
puthelp "NOTICE $nick :$tnick nu se afla pe $chan"
}
}
else {
puthelp "NOTICE $nick :Sintaxa incorecta!"
puthelp "NOTICE $nick :Folositi .vo nick"
puthelp "NOTICE $nick :Ex. : .vo Lamer"
}
}
}

proc pub:kick {nick uhost hand chan text} {
if ([string lenght $text] > 0 {
set tnick [lindex $text 0]
if ([string lenght [lindex $text 1]] == 0} {
puthelp "NOTICE $nick :Nu ati precizat un motiv pentru kick!"
puthelp "NOTICE $nick :Folositi .k nick motiv"
puthelp "NOTICE $nick :Ex. : .k Lamer out"
}
else {
set reason [lrange $text 1 end]
}
if {[onchan $tnick $chan]} {
puthelp "PRIVMSG X :kick $chan $tnick $reason"
}
else {
puthelp "NOTICE $nick :$tnick nu se afla pe $chan"
}
else {
puthelp "NOTICE $nick :Sintaxa incorecta!"
puthelp "NOTICE $nick :Folositi .k nick motiv"
puthelp "NOTICE $nick :Ex. : .k Lamer out"
}
}
}

proc pub:ban {nick uhost hand chan text} {
if {[string lenght $text] > 0} {
set tnick [lindex $text 0]
if {[onchan $tnick $chan]} {
if {[string lenght [lindex $text 1]] == 0} {
puthelp "NOTICE $nick :Nu ati precizat un motiv pentru kick!"
puthelp "NOTICE $nick :Folositi .b nick motiv"
puthelp "NOTICE $nick :Ex. : .b Lamer out"
}
else {
set reason [lrange $text 1 end]
}
if {[onchan $tnick $chan]} {
set maska *!*@[lindex [split [getchanhost $tnick $chan] "@"] 1]
puthelp "PRIVMSG X :ban $chan $maska $durataban $access $reason
}
else {
puthelp "NOTICE $nick :$tnick nu se afla pe $chan"
}
}
else {
puthelp "NOTICE $nick :Sintaxa incorecta!"
puthelp "NOTICE $nick :Folositi .b nick motiv"
puthelp "NOTICE $nick :Ex. : .b Lamer out"
}
}
}

proc pub:unban {nick uhost hand chan text} {
if {[string lenght $text] > 0} {
set maska [lindex $text 0]
puthelp "PRIVMSG X:unban $chan $maska"
}
else {
puthelp "NOTICE $nick :Sintaxa incorecta!"
puthelp "NOTICE $nick :Folositi .ub maska"
puthelp "NOTICE $nick :Ex. : .ub *!*@Lamer.users.undernet.org"
}
}
}

proc pub:reguli {nick chan text} {
puthelp "NOTICE $nick :O lista a regulilor canalului $chan o puteti gasi pe adresa :"
puthelp "NOTICE $nick :http://www.irc-iasi.com/inv/index.php?showtopic=14"
}

proc notice { from keyword text nick text} {
if { $from == "X!cservice@undernet.org" } {
set noticetext
puthelp "NOTICE $nick $nick $noticetext"
}
else {
return 0
}
}

putlog "OPTools loaded ... (c) 2005 CBernetic"
when i put .rehash, crash.
so i use the script:

Code: Select all

set error ""
foreach script {
OPTools.tcl
} {
catch {source scripts/$script} error
if {$error != ""} {putcmdlog "\002SCRIPT ERROR\002:$script\: $::errorInfo"}
}
and run the eggdrop and the script OPTools get me error.

Code: Select all

<(ScanSpam> [23:52] Tcl error [notice]: invalid command name "notice"
and

Code: Select all

<Nor7on> .set errorInfo
<(ScanSpam> Currently: invalid command name "notice"
<(ScanSpam> Currently:     while executing
<(ScanSpam> Currently: "notice $_notc1 $_notc2 $_notc3 $_notc4 $_notc5"
can helpme?
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

Code: Select all

puthelp "NOTICE $nick :.reguli   | Comanda poate fi executata si de useri obisnuiti!
Should be

Code: Select all

puthelp "NOTICE $nick :.reguli   | Comanda poate fi executata si de useri obisnuiti!"
infact it has many bugs such as:

Code: Select all

lenght
should be:

Code: Select all

length
I suggest you to find any other script like that from Archive

peace
death
|AmDeAtH @ Undernet
Death is only the *Beginning*...
User avatar
Nor7on
Op
Posts: 185
Joined: Sat Mar 03, 2007 8:05 am
Location: Spain - Barcelona
Contact:

Post by Nor7on »

have a tcl or code with this function:

that my eggdrop add permban (if set 0) in your banlist and put too ban via X only for 1 hour.

example:
.ban Jolines 0 Spam
* X pone modo: +b *!*@92.81.80.136
* Jolines has KICKED by X ((myeggdropuser) Spam)

.ban <nick> <perm or 0> <message>
if set 0 = permban in the banlist of eggdrop.
and X only put ban for 1 hour.


:roll:
User avatar
Nor7on
Op
Posts: 185
Joined: Sat Mar 03, 2007 8:05 am
Location: Spain - Barcelona
Contact:

Post by Nor7on »

Hi.

I fix the tcl.. ufff its hard eh! xDD

Code: Select all

bind pub o .b pub:ban
bind pub o .ub pub:ub

proc pub:ban {nick uhost hand chan text} {
  if {[botisop $chan]} {
    if {[string length $text] > 0} {
      set tnick [lindex $text 0]
      if {[onchan $tnick $chan]} {
        if {[string length [lindex $text 1]] == 0} { set reason banned } else { set reason [lrange $text 1 end] }
        newchanban $chan *!*@[lindex [split [getchanhost $tnick $chan] @] 1] $nick $reason 0
		set maska *!*@[lindex [split [getchanhost $tnick $chan] @] 1]
        [putserv "PRIVMSG X :ban $chan $maska 1 100 $reason"]
      } else { puthelp "notice $nick :no such nick on channel!" }
    } else { puthelp "NOTICE $nick :usage !kb <nick> reason - kicks and bans a nick" }
  } else { puthelp "NOTICE $nick :algo falla on" }
}

proc pub:ub {nick uhost hand chan text} {
  if {[botisop $chan]} {
    if {[string length $text] > 0} {
      set tnick [lindex $text 0]
		[putserv "PRIVMSG X :unban $chan $tnick"]
      if {[ischanban $tnick $chan]} { killchanban $chan $tnick } else { puthelp "NOTICE $nick :no such ban on $chan" }
    } else { puthelp "NOTICE $nick :usage !ub <nick!user@host> - unbans an address" }
  } else { puthelp "NOTICE $nick :i dont have ops!" }
}
this is the code. its work good ;)

but... y get this little message in the partyline when put .ub *!*@mask.

Code: Select all

<(ScanSpam> [00:44] Tcl error [pub:ub]: invalid command name ""
<Nor7on> .set errorInfo
<(ScanSpam> Currently: invalid command name ""
<(ScanSpam> Currently:     while executing
<(ScanSpam> Currently: "[putserv "PRIVMSG X :unban $chan $tnick"]"
<(ScanSpam> Currently:     (procedure "pub:ub" line 5)
<(ScanSpam> Currently:     invoked from within
<(ScanSpam> Currently: "pub:ub $_pub1 $_pub2 $_pub3 $_pub4 $_pub5"
and this when put .b nick message.

Code: Select all

<(ScanSpam> [00:47] Tcl error [pub:ban]: invalid command name ""
<Nor7on> .set errorInfo
<(ScanSpam> Currently: invalid command name ""
<(ScanSpam> Currently:     while executing
<(ScanSpam> Currently: "[putserv "PRIVMSG X :ban $chan $maska 1 100 $reason"]"
<(ScanSpam> Currently:     (procedure "pub:ban" line 9)
<(ScanSpam> Currently:     invoked from within
<(ScanSpam> Currently: "pub:ban $_pub1 $_pub2 $_pub3 $_pub4 $_pub5"
and can helpme for this tcl work when my eggdrop don't have the @ ?
..cause when my eggdrop don't have @ don't put ban/unban via X.

Thanks, :)
User avatar
MenzAgitat
Op
Posts: 118
Joined: Tue Jul 04, 2006 12:35 pm
Location: France
Contact:

Post by MenzAgitat »

Simply remove the brackets in :

Code: Select all

[putserv "PRIVMSG X :ban $chan $maska 1 100 $reason"]
and

Code: Select all

[putserv "PRIVMSG X :unban $chan $tnick"]
User avatar
Nor7on
Op
Posts: 185
Joined: Sat Mar 03, 2007 8:05 am
Location: Spain - Barcelona
Contact:

Post by Nor7on »

Hey Manz..

Thanks :D

Work !!

all the problem solved

thanks. :D
Post Reply