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.

Userlist error

Old posts that have not been replied to for several years.
Locked
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Userlist error

Post by r0t3n »

The script:

Code: Select all

bind pub o|f !userlist user:list  

proc user:list {nick host hand chan args} {
   puthelp "NOTICE $nick :SYNTAX: !userlist"
    return 0
   }
   if {[userlist] == ""} {
     puthelp "NOTICE $nick :There are no users in my userlist for $chan "
     return 0
    }
    foreach user [join [lrange [userlist] 0 end]] {
     lappend users "$user ([chattr $user $chan])"
    }
    foreach userwrap [wordwrap [join $users { - }]] {
     puthelp "NOTICE $nick :Users: $userwrap"
    }
   } else {
    puthelp "NOTICE $nick :SYNTAX: !userlist"
   }
   return 0
  }

putlog "Userlist Script Loaded"

The error:

<[-Guard-]> [17:48] can't read "chan": no such variable
<[-Guard-]> while executing
<[-Guard-]> "puthelp "NOTICE $nick :There are no users in my userlist for $chan ""
<[-Guard-]> invoked from within
<[-Guard-]> "if {[userlist] == ""} {
<[-Guard-]> puthelp "NOTICE $nick :There are no users in my userlist for $chan "
<[-Guard-]> return 0
<[-Guard-]> }"
<[-Guard-]> (file "scripts/userlist.tcl" line 7)
<[-Guard-]> invoked from within
<[-Guard-]> "source scripts/userlist.tcl"
<[-Guard-]> (file "eggdrop.conf" line 1352)
<[-Guard-]> [17:48] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)

please help!![/i]
r0t3n @ #r0t3n @ Quakenet
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

bind pub o|f !userlist user:list  

proc user:list {nick host hand chan args} { 
 if {[userlist] == ""} { 
  puthelp "NOTICE $nick :There are no users in my userlist for $chan " 
  return 0 
 } 
 foreach user [join [lrange [userlist] 0 end]] { 
  lappend users "$user ([chattr $user $chan])" 
 } 
 foreach userwrap [wordwrap [join $users { - }]] { 
  puthelp "NOTICE $nick :Users: $userwrap" 
 } 
} 

putlog "Userlist Script Loaded"
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

thanks dude. But i want to chan the output from:

-[-Guard-]- Users: ShoVe (ajmnoptx|-) - Tosser^^ (hjmnoptx|-) - L (ahjmoptx|-) - Q
-[-Guard-]- Users: (ahjmoptx|amnov) - CC|alfn (hp|amov) - CC|alfn`` (hp|-) - CC|FF^BnC
-[-Guard-]- Users: (hp|amno) - CC|h0h0 (hp|amov) - fishbot (hp|-) - Garfield (hp|-) -
-[-Guard-]- Users: Sanchezz (hp|ao) - Sarge] (hp|av)

to this output:
Userlist For $chan:
Handle/Nick Flags
User Flags
User2 Flags
User3 Flags

etc and make it in order, so owners at the top of the userlist, and F friends at the bottom. Please help, Thanks!!
r0t3n @ #r0t3n @ Quakenet
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

bind pub o|f !userlist user:list  

proc user:list {nick host hand chan args} { 
 if {[userlist] == ""} { 
  puthelp "NOTICE $nick :There are no users in my userlist for $chan " 
  return 0 
 } 
 puthelp "NOTICE $nick :Users For $chan:"
 foreach user [userlist] { 
  puthelp "NOTICE $nick :$user [chattr $user $chan]" 
 } 
}
Locked