Quote:
First, if you're displaying code here, please put it inside [ code ] and [ /code ] tags. It makes it easier to read.

Second, your answer:

Code:
on *:text:!chan *:*:{
  if ($2 == add && $3 != $null) {
    var %chan = $iif($chr(35) !isin $3,$chr(35) $+ $3,$3)
    if ($read(list.txt,w,%chan) == $null) {
      write list.txt %chan
      .notice $nick $3 added to list.
    }
    else .notice $nick Channel already exists.
  }
  elseif ($2 == del && $3 != $null) {
    var %chan = $iif($chr(35) !isin $3,$chr(35) $+ $3,$3)
    if ($read(list.txt,w,%chan) != $null) {
      write -dl $+ $readn list.txt
      .notice $nick $3 deleted from list.
    }
    else .notice $nick No channel on list.
  }
  elseif ($2 == join) {
    var %cnt = 1
    var %lines = $lines(list.txt)
    while (%cnt <= %lines) {
      join -n $read(list.txt,%cnt)
      inc %cnt
    }
  }
  else .notice $nick Invalid command.
}


Usage:

!chan add #channel
!chan del #channel
!chan join

Note that it will work if you use # in #channel or not. Also, note that it's not written to accept a list of #channels on a single !chan add line.

Thank u verymuch Riamus2
smile Thank u