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 

OPTools something wrong.

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
Nor7on
Op


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

PostPosted: Thu Feb 21, 2008 6:53 pm    Post subject: OPTools something wrong. Reply with quote

i have install this tcl. http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&id=1157

Code:

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

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:
<(ScanSpam> [23:52] Tcl error [notice]: invalid command name "notice"


and

Code:

<Nor7on> .set errorInfo
<(ScanSpam> Currently: invalid command name "notice"
<(ScanSpam> Currently:     while executing
<(ScanSpam> Currently: "notice $_notc1 $_notc2 $_notc3 $_notc4 $_notc5"


can helpme?
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Thu Feb 21, 2008 11:29 pm    Post subject: Reply with quote

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


Should be

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


infact it has many bugs such as:

Code:
lenght
should be:
Code:
length


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

peace
death
_________________
|AmDeAtH @ Undernet


Death is only the *Beginning*...
Back to top
View user's profile Send private message Visit poster's website
Nor7on
Op


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

PostPosted: Fri Feb 22, 2008 2:35 pm    Post subject: Reply with quote

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.


Rolling Eyes
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Nor7on
Op


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

PostPosted: Fri Feb 22, 2008 7:46 pm    Post subject: Reply with quote

Hi.

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

Code:

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 Wink

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

Code:

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


Joined: 04 Jul 2006
Posts: 118
Location: France

PostPosted: Fri Feb 22, 2008 8:16 pm    Post subject: Reply with quote

Simply remove the brackets in :
Code:
[putserv "PRIVMSG X :ban $chan $maska 1 100 $reason"]

and
Code:
[putserv "PRIVMSG X :unban $chan $tnick"]
Back to top
View user's profile Send private message Visit poster's website
Nor7on
Op


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

PostPosted: Fri Feb 22, 2008 8:27 pm    Post subject: Reply with quote

Hey Manz..

Thanks Very Happy

Work !!

all the problem solved

thanks. Very Happy
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases 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