WorldDMT commented on a Page, Multiple Channel Greeting  -  May 15, 2009

hi

use files better than variables

make folder "data" and make file Admin.txt then u add the nick can add/remove the greetings
and u will have into this folder all files greeting for all chans

on *:text:*:#:{
  if $read(data/Admin.txt,w,$nick) {
    if ($strip($1-2) == !set greeting) && (!$read(data/greeting $+ #,w,$3-)) {
      write data/greeting $+ # $3-
      notice $nick Greeting has been added.
    }
    elseif ($strip($1-2) == !del greeting) && ($read(data/greeting $+ #,w,$3-)) {
      write -dl $+ $readn data/greeting.txt
      notice $nick Greeting has been removed.
    }
  }
  elseif ($strip($1-2) == !view greeting) {
    if ((!$3) && ($exists(data/greeting $+ #))) .play # data/greeting $+ #
    elseif ($3 isnum) {
      msg # $iif($read(data/greeting $+ #,$3),$v1,$iif($lines(data/greeting $+ #),No greeting msg for #,greeting N° 1 to $v1))
    }
    else .timergrt 1 1 msg # Syntax: !view greeting or !view greeting <N>
  }
}
on *:JOIN:#:notice $nick $read(data/greeting $+ #)
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.