woc_vt
Posted by Fubar
Saturday, April 10, 2004
Description: clan profiles


;edit %chan for channel, %cmd for command prefix, and %color for color
on *:START: {
  set %cmd -
  set %chan #script
  set %color [^K]1,0
}
;do NOT edit this section
on *:TEXT:$(%cmd $+ addclan *):%chan: {
  if ($ini(clans.ini,$remove($gettok($1-,1,44),-addclan $+ $chr(32)))) {
    notice $nick %color $+ $remove($gettok($1-,1,44),-addclan $+ $chr(32)) is already on the list
    halt
  }
  elseif ($numtok($gettok($1-,2,44),32) == 5) {
    echo -a $remove($gettok($1-,1,44),-addclan $+ $chr(32))
    writeini clans.ini $+(",$remove($gettok($1-,1,44),-addclan $+ $chr(32)),") Leader $gettok($gettok($1-,2,44),1,32)
    writeini clans.ini $+(",$remove($gettok($1-,1,44),-addclan $+ $chr(32)),") Email $gettok($gettok($1-,2,44),2,32)
    writeini clans.ini $+(",$remove($gettok($1-,1,44),-addclan $+ $chr(32)),") Channel $gettok($gettok($1-,2,44),3,32)
    writeini clans.ini $+(",$remove($gettok($1-,1,44),-addclan $+ $chr(32)),") Website $gettok($gettok($1-,2,44),4,32)
    writeini clans.ini $+(",$remove($gettok($1-,1,44),-addclan $+ $chr(32)),") Location $gettok($gettok($1-,2,44),5,32)
    notice $nick %color $+ Clan " $+ $remove($gettok($1-,1,44),-addclan $+ $chr(32)) $+ " added
  }
  else {
    notice $nick %color $+ Not enough parameters
  }
}
alias information {
  if ($1 == 1) {
    return Leader: $readini(clans.ini,$2,Leader)
  }
  elseif ($1 == 2) {
    return Email: $readini(clans.ini,$2,Email)
  }
  elseif ($1 == 3) {
    return Channel: $readini(clans.ini,$2,Channel)
  }
  elseif ($1 == 4) {
    return Website: $readini(clans.ini,$2,Website)
  }
  elseif ($1 == 5) {
    return Location: $readini(clans.ini,$2,Location)
  }
}
on *:TEXT:$(%cmd $+ clan *):%chan:{
  if ($ini(clans.ini,$remove($gettok($1-,1,44),-clan $+ $chr(32)))) {
    var %i 1
    while (%i <= 5) {
      notice $nick %color $+ $information(%i,$remove($gettok($1-,1,44),-clan $+ $chr(32)))
      inc %i
    }
  }
  else {
    notice $nick %color $+ No such clan $2-
  }
}
on *:TEXT:$(%cmd $+ delclan *):%chan: {
  if ($ini(clans.ini,$2-)) {
    remini clans.ini $+(",$2-,")
    notice $nick %color $+ Profile " $+ $2- $+ " deleted
  }
  else {
    notice $nick %color $+ Profile $2- not found
  }
}
Subject line
Posted by nemm91
Friday, April 30, 2004 01:08pm PDT
<mirc>
sup guys nice job on this fuber
Submit a comment
Oops! You need to login or register before you can post a comment!

ebaum's world