Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 20th, 2010 | Syntax: PHP | Size: 0.68 KB | Hits: 33 | Expires: Never
This paste has a previous version, view the difference. Copy text to clipboard
  1. bind join - *#channel* delay_givewelcome
  2. set welc(msg) "Hello %nick, please state your question, your site username, and the site you are having problems on. Then wait patiently for staff to assist you."
  3. set welc(chan) "#channel"
  4. set welc(type) "2"
  5.  
  6. proc givewelcome {nick uhost hand chan} {
  7.   global welc
  8.   if {[isop $nick $chan] || [ishalfop $nick $chan] || [isvoice $nick $chan]} {return}
  9.   set welctxt [string map [list %nick $nick %chan $chan] $welc(msg)]
  10.   switch $welc(type) {
  11.     1 { puthelp "NOTICE $nick :$welctxt" }
  12.     2 { puthelp "PRIVMSG $chan :$welctxt" }
  13.   }
  14. }
  15.  
  16. proc delay_givewelcome {nick uhost hand chan} {
  17.   utimer 30 [list givewelcome $nick $uhost $hand $chan]
  18. }