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.

help with a script

Old posts that have not been replied to for several years.
Locked
L
Lfe

Post by Lfe »

hi there,

ive looked through the suninet faq but cant find how to bind invites on joins (im a noob i know :smile:) so i would really appreciate some help

if a user with have the flags +o in the chan #test joins #test2 the script would check if the user has the flag +o in #test. if he has, invite him to #test


i was also wondering if there is a way to get file attributes (like date, rights) via TCL commands or do u have to format the output from a 'ls -al' command or something

the thing i want to do is list recursively through some directories and return the file which has been updated most recently

thanks for reading,
best regards
Johan

<font size=-1>[ This Message was edited by: Lfe on 2002-03-10 08:41 ]</font>
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

1.

Code: Select all

bind join - "#test2 *!*@*" join:invite

proc join:invite {nick uhost hand chan} {
  # Check if the user has either +o #test2 or global +o:
  if {![matchattr $hand o|o #test2]} { return }
  # Invite the user:
  putserv "INVITE $nick #test2"
}
2. Read http://www.scriptics.com/man/tcl8.3/TclCmd/glob.htm and http://www.scriptics.com/man/tcl8.3/TclCmd/file.htm.
L
Lfe

Post by Lfe »

hi there and thanks for your post

i cant get it to work,

Code: Select all

bind join - "#b4 *!*@*" join:invite

proc join:invite {nick uhost hand chan} {
  # Check if the user has either +o #test2 or global +o:
  if {![matchattr $hand o|o #b4]} { return }
  # Invite the user:
  putserv "INVITE $nick #b4"
}
the chan it should be checking in is #khn (if the user joins #khn, invite to #b4)

so i changed the
bind join - "#b4 *!*@*" join:invite
to
bind join - "#khn *!*@*" join:invite
but it didnt do the trick

what should i do?

best regards
Johan
Locked