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 

error in tcl.

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
vel0x
Voice


Joined: 07 Dec 2005
Posts: 1

PostPosted: Wed Dec 07, 2005 12:49 pm    Post subject: error in tcl. Reply with quote

Hi,
in this tcl, when i send the command, i have:

[10:41] Tcl error [pub_cst]: invalid command name "notice"

why ? Confused

Code:

##############################################################################################################

######################### IRCguard Channel Settings Public Commands Version 2.0 By B0gdaN ####################

# Eggdrop TCL Script: [IRCguard Tools] Copyright (C) 2003-2004 IRCguard Productions.

# This software is free under the terms of GNU GPL 2.

# HomePage: http://www.IRCguard.tk/

# E-MAIL: B0gdaN@Undernet.ro

# A complete channel settings public commands for Eggdrop v1.6.x or higher.

# Short descriptions of commands is available before each procedure.

# To change the setting for your channel just tipe in channel <<.seen on>> to set +seen and <<.seen off>> to

# set -seen for channel.

# Now you can add more channel settings!!!Example:if you are using the Next script just add <<next>> in mods list

# and you can set +next or -next for your channel like with a public command->.next on or .next off

# To install it just place the tcl file in your bot scripts director and creat this line in your bot config file

#" source scripts/pubsettings.tcl "

# Rstart your bot and enjoy!

#

###################################################SETTINGS###################################################



#

##Here You can add more channel settings:

#

set mods "autoop autohalfop autovoice protectops protecthalfops protectfriends dontkickops revenge revengebot statuslog seen shared greet nodesynch userbans dynamicbans enforcebans inactive bitch secret cycle bitch"



#

##Here you can add more channel modes:

#

set modss "flood-chan flood-nick flood-ctcp flood-deop flood-kick flood-join aop-delay ban-time"



#

#Here you can change the prefix of your command

#

set cmdpfix "."



#

## Don't edit past here unless you know TCL!

#



####################################################BINDS######################################################



foreach modd [string tolower $modss] { bind pub n|n ${cmdpfix}$modd pub_fst }

foreach mod [string tolower $mods] { bind pub n|n ${cmdpfix}$mod pub_cst }



proc pub_fst {nick host hand chan args} {

   global botnick lastbind cmdpfix

   if {[llength [split $args]] < 1} {

   notice $nick "Usage: $lastbind < \002number\002 / \002seconds\002 >"

   return 0 }

   set args [lindex $args 0]

   set args [split $args]

   set mode [string tolower [lindex $args 0]]

        set stat [string tolower [lindex [split $lastbind "$cmdpfix"] 1]]

        channel set $chan $stat $mode

   notice $nick "$stat mode $chan is now \002$mode\002." 

   putcmdlog "<<$nick>> !$hand! set $stat for $chan $mode" }



proc pub_cst {nick host hand chan args} {

   global botnick lastbind cmdpfix

   if {[llength [split $args]] < 1} {

   notice $nick "Usage: $lastbind < \002on\002 / \002off\002 >"

   return 0 }

   set args [lindex $args 0]

   set args [split $args]

   set mode [string tolower [lindex $args 0]]

   set chan_mode ""

        set stat [string tolower [lindex [split $lastbind "$cmdpfix"] 1]]

   if { $mode == "on" } { set chan_mode "+$stat" }

   if { $mode == "off" } { set chan_mode "-$stat" }

   if { $chan_mode == ""} {

   notice $nick "Invalid argument \002$mode\002"

   notice $nick "Usage: ${cmdpfix}$stat < \002on\002 / \002off\002 >"

   return 0 }

   channel set $chan $chan_mode

   notice $nick "$stat mode for $chan is now \002$mode\002." 

   putcmdlog "<<$nick>> !$hand! $stat $chan $mode" }



   putlog "Channel Settings Commands v 2.0 By B0gdaN LOADED"
Back to top
View user's profile Send private message
]Kami[
Owner


Joined: 24 Jul 2003
Posts: 590
Location: Slovenia

PostPosted: Wed Dec 07, 2005 1:52 pm    Post subject: Reply with quote

Change

Code:
notice $nick "Usage: $lastbind < \002on\002 / \002off\002 >"


with

Code:
putquick "notice $nick :Usage: $lastbind < \002on\002 / \002off\002 >"

_________________
Slovene Eggdrop Page
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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