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.

How come this dont work

Help for those learning Tcl or writing their own scripts.
Post Reply
v
vince164
Voice
Posts: 7
Joined: Tue May 23, 2006 9:38 pm

How come this dont work

Post by vince164 »

Hi am trying to get this code to work but im haveing difficulty. i do have the vhchan set, the problem im haveing is the proc msg:vhchan dosent seem to work

Code: Select all

setudef flag vhchan

bind pub - !vhost pub:vhost
bind notc - * msg:vhchan
bind pub - !remove pub:remove
bind pub - !help pub:help
proc pub:remove {nick uhost hand chan text} {
  if { $chan == "#vhost" } {
    putquick "PRIVMSG hostserv :DEL $nick"
    putquick "PRIVMSG $chan :$nick 4your vhost has been removed, 8Thank you for stoping by #vhost have a good day"
    return
  }
}
proc pub:help {nick uhost hand chan text} {
  if { $chan == "#vhost" } {    putquick "PRIVMSG $chan :!Remove - will remove your vhost"
    putquick "PRIVMSG $chan :!vhost hostname - will give you the vhost specified"
    putquick "PRIVMSG $chan :would set your vhost to: I.got.my.own.vhost"
    putquick "PRIVMSG $chan :The choosen vhost is permanent, only when your nick is registered, and will be enabled on identification with nickserv"
    return
  }
}


proc pub:vhost {nick host hand chan text} {
 if {![channel get $chan vhchan]} {return}
	set vhost [lindex $text 0]
      if {($vhost == "")} {putserv "PRIVMSG $chan :$nick Please specify a hostname you would like... Try again!"; return}
	 if {($vhost != "")} {
    putserv "PRIVMSG hostserv :set $nick $vhost"
   }
}
proc msg:vhchan {nick uhost hand text chan} {
  if {[string match -nocase "HostServ" $nick]} {
   set line [lrange [split $text] 0 end]
    putserv "PRIVMSG $chan :[join $line]"
    if {([string match -nocase "*A vhost must*" $line])} {putserv "PRIVMSG $chan :8Please use proper format. \(!vhost ident@vhost.com\)"; return}
     putserv "PRIVMSG $chan :15To Activate your vhost type /msg hostserv on"
   }
}
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

Code: Select all

proc msg:vhchan {nick uhost hand text chan}
is wrong, should be

Code: Select all

proc msg:vhchan {nick uhost hand chan text}
v
vince164
Voice
Posts: 7
Joined: Tue May 23, 2006 9:38 pm

Post by vince164 »

i get this error now

Tcl error [pub_raw]: can't read "whoami": no such variable
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

1) proc pub_raw is not in the script you posted
2) there is no call for "whoami" in what you posted
v
vince164
Voice
Posts: 7
Joined: Tue May 23, 2006 9:38 pm

Post by vince164 »

lol thats what im wondering, everytime i do !vhost myvhost.com it says that in the partyline
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

this is because of some lame script bound to raw. It is obviously triggered by some feedback from the server in that script. Check the script with that function.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Post Reply