Jump to content
chain

TCL Partyline

Recommended Posts

  • Administrators
# partyline notify 1.2.1 - by wreck
# thanks to: blood_x, ppslim, quasimodo
#

# Set this to the channel to notify.
set party-chan "#Channel #Channel2 #Channel3"

proc login:party {hand idx} {
  global party-chan
  foreach who [dcclist] {
    if {[lindex $who 1] == $hand} {
      if {[string length [set email [getuser $hand XTRA EMAIL]]] > 0} {
        puthelp "PRIVMSG ${party-chan} :$hand \[\002$email\002\] \([lindex $who 2]\) Connected."
      } else {
        puthelp "PRIVMSG ${party-chan} :$hand \([lindex $who 2]\) Connected."
      }
      break
    }
  }
}

proc logout:party {hand idx} {
  global party-chan party-just-quit
  if {[info exists party-just-quit] && ${party-just-quit} == $hand} {unset party-just-quit ; return 0}
  puthelp "PRIVMSG ${party-chan} :$hand Disconnected \(lost connection\)."
}

proc logout:filt {idx text} {
  global party-chan party-just-quit
  set hand [idx2hand $idx]
  set party-just-quit $hand
  if {[llength $text] > 1} {
    puthelp "PRIVMSG ${party-chan} :$hand Disconnected \([lrange [split $text] 1 end]\)."
  } else {
    puthelp "PRIVMSG ${party-chan} :$hand Disconnected \(lost connection\)."
  }
  return $text
}

bind chon - * login:party
bind chof - * logout:party
bind filt - .quit* logout:filt

putlog "partyline-notify :${party-chan} :Loaded"

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...