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 rehash

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


Joined: 26 Dec 2005
Posts: 82

PostPosted: Mon Jan 16, 2006 6:36 pm    Post subject: error rehash Reply with quote

hi and thx for all help

when I type .rehash my bot crash with the reason:

Quote:

can't rename to "maskhost_org": command already exists
while executing
"rename maskhost maskhost_org"
invoked from within
"if {"" == [info commands maskhost_old]} { ;#only rename if its not already done
rename maskhost maskhost_org
}"
(file "scripts/hostqnet.tcl" line 20)
invoked from within
"source scripts/hostqnet.tcl"


the tcl

Code:

##########################################
#
# maskhost.tcl
#  by Elven <elven@elven.de>
#  under the GNU/GPL
#  http://www.gnu.org/copyleft/gpl.html
#
#  Overwrites "maskhost" to support
#  efficient Quakenet-Mask bans.
#
#  To remove the script without restart-
#  ing the bot, run 'maskhost_remove'.
#
#  You can easily add support for more
#  masks/hosts/networks by adding more
#  if {}s.
#
##########################################

if {"" == [info commands maskhost_old]} { ;#only rename if its not already done
  rename maskhost maskhost_org
}


proc maskhost {host} {

  #Quakenet
  if {[string match -nocase "*.users.quakenet.org" $host]} {
    set rhost [lindex [split $host @] 1]
    if {$rhost == ""} { return [maskhost_org $host] } ;#let the original thing worry about that
    return "*!*@${rhost}"
  }
 
  return [maskhost_org $host]
}


proc maskhost_remove {} {
  catch { info body maskhost } res_mask
  if {"" == [info commands maskhost_old]} { return }
  rename maskhost ""
  rename maskhost_org maskhost
  rename maskhost_remove ""
}



For what? because when I restart my eggdrop it restart without error.Error only detected on type .rehash

Thx
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Jan 16, 2006 7:37 pm    Post subject: Reply with quote

Code:
if {"" == [info commands maskhost_old]} { ;#only rename if its not already done
  rename maskhost maskhost_org
}

should be
Code:
if {"" == [info commands maskhost_org]} { ;#only rename if its not already done
  rename maskhost maskhost_org
}

and
Code:
if {"" == [info commands maskhost_old]} { return }

should be
Code:
if {"" == [info commands maskhost_org]} { return }

but that maskhost_remove proc is not being used in this script.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
pilouuu
Halfop


Joined: 26 Dec 2005
Posts: 82

PostPosted: Mon Jan 16, 2006 8:20 pm    Post subject: Reply with quote

thx Good staff thx u very much
Back to top
View user's profile Send private message
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