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.

set script

Old posts that have not been replied to for several years.
C
Carnage69
Halfop
Posts: 64
Joined: Sat Jun 07, 2003 8:25 pm

set script

Post by Carnage69 »

will someone please tell me what is wrong with this

set tr "@"
set cc "@"

set nopub "#q3f"

bind pub -|- ${tr}setwebsite setwebsite
bind pub -|- ${tr}website website

set qversion "1.5"



proc setwebsite {nick host hand chan arg} {
global url pathqstat cc nopub setwebsite
if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
if {$arg == ""} {
putserv "notice $nick :Usage: ${cc}setwebsite <^BIP Address^B>"
return 0
}
set website "$arg"
putserv "NOTICE $nick :Website Set To $Website"
}
proc website {nick host hand chan arg} {
global url pathqstat cc nopub website
if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
if {$arg == ""} {
putserv "notice $nick :$website "
return 0
}
}
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Probably the fact that you called the variable setwebsite in one place, and website in another.
C
Carnage69
Halfop
Posts: 64
Joined: Sat Jun 07, 2003 8:25 pm

script

Post by Carnage69 »

i changed it but @website dont work @set website does



set tr "@"
set cc "@"

set nopub "#q3f"
bind pub -|- ${tr}setwebsite setweb
bind pub -|- ${tr}Website site


proc setweb {nick host hand chan arg} {
global url pathqstat cc nopub setweb
if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
if {$arg == ""} {
putserv "notice $nick :Usage: ${cc}setwebsite Address"
return 0
}
set website "$arg"
putserv "NOTICE $nick :Website set to $website"
}
proc site {nick host hand chan arg} {
global url pathqstat cc nopub site
if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
if {$arg == ""} {
putserv "notice $nick : $website "
return 0
}
}
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Post by egghead »

Probably the fact that you called the variable website but didn't declare it as a global in both procs.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Dude you destroyed your script! Look, the only problem in the original script was this line:

global url pathqstat cc nopub setwebsite

See, you've called the variable "setwebsite" by mistake.

In your edited script, you messed everything up lol. In one place you call it setweb, in another you call it site, and of course still "website" as it should be in some places. Dude, you really can't just make up names and expect things to work hehe. Change it all to "website" and you'll be ok.
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Post by egghead »

/me waits for iteration 3 :)
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Yeah heh. It's occurred to me that maybe he's mixing up variable names with proc names.

To Carnage69: you didn't need to change the *proc* names. Just change the variable "setwebsite" to "website".
C
Carnage69
Halfop
Posts: 64
Joined: Sat Jun 07, 2003 8:25 pm

Post by Carnage69 »

set tr "@"
set cc "@"

set nopub "#q3f"

bind pub -|- ${tr}setwebsite setweb
bind pub -|- ${tr}website website

set qversion "1.5"



proc setweb {nick host hand chan arg} {
global url pathqstat cc nopub setwebsite
if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
if {$arg == ""} {
putserv "notice $nick :Usage: ${cc}setwebsite <^BIP Address^B>"
return 0
}
set website "$arg"
putserv "NOTICE $nick :Website Set To $Website"
}
proc website {nick host hand chan arg} {
global url pathqstat cc nopub website
if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
if {$arg == ""} {
putserv "notice $nick :$website "
return 0
}
}


what is wrong with that
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

dude...in the global-line.
btw: case matters, so $Website != $website
C
Carnage69
Halfop
Posts: 64
Joined: Sat Jun 07, 2003 8:25 pm

this

Post by Carnage69 »

set tr "@"
set cc "@"

set nopub "#q3f"

bind pub -|- ${tr}setwebsite setweb
bind pub -|- ${tr}website web

set qversion "1.5"



proc setweb {nick host hand chan arg} {
global url pathqstat cc nopub setwebsite
if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
if {$arg == ""} {
putserv "notice $nick :Usage: ${cc}setwebsite <^BIP Address^B>"
return 0
}
set website "$arg"
putserv "NOTICE $nick :Website Set To $Website"
}
proc web {nick host hand chan arg} {
global url pathqstat cc nopub website
if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
if {$arg == ""} {
putserv "notice $nick :$website "
return 0
}
}


WHAT IS WRONG CAN SOMONE PLEASE FIX IT UP AND THEN COPY AND PAST IT BACK IN.
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

1: get clue
2: read the error messages displayed on your partyline
3: stop posting the entire script every time
4: don't shout
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Come on don't get mad. Read what we said and try it again. It's just one or two things you need to change -- 'setwebsite' and 'Website'.
C
Carnage69
Halfop
Posts: 64
Joined: Sat Jun 07, 2003 8:25 pm

i tryed

Post by Carnage69 »

i tryed doing that and i came out with this @setwebsite works just not @website i dont get any error massage when i start it

set tr "@"
set cc "@"

set nopub "#q3f"

bind pub -|- ${tr}setwebsite setweb
bind pub -|- ${tr}Website Web

set qversion "1.5"



proc setweb {nick host hand chan arg} {
global url pathqstat cc nopub Website
if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
if {$arg == ""} {
putserv "notice $nick :Usage: ${cc}setwebsite <^BIP Address^B>"
return 0
}
set Website "$arg"
putserv "NOTICE $nick :Website set to $Website"
}
proc web {nick host hand chan arg} {
global url pathqstat cc nopub Website
if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
if {$arg == ""} {
putserv "notice $nick :$Website"
return 0
}
}
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Case matters for proc names too.
C
Carnage69
Halfop
Posts: 64
Joined: Sat Jun 07, 2003 8:25 pm

well

Post by Carnage69 »

well i got it up how do i make it so only people with +afop +++ access on the userlist can do @setwebsite
Locked