fragradio apply
Posted by chriscloyd
Monday, October 30, 2006
Description:

on *:TEXT:@apply*:#FragRadio:{
  if (!$2) {
    notice $nick [^K]8,1[^B][^U]×[^B][^U][^K]0 Sorry [^K]8,1[^B][^U]×[^B][^U][^K]0 You must add a channel [^K]8,1[^B][^U]×[^B][^U]
    notice $nick [^K]8,1[^B][^U]×[^B][^U][^K]0 Example .apply #FragRadio [^K]8,1[^B][^U]×[^B][^U]
  }
  elseif ($2 == #FragRadio) {
    notice $nick [^K]8,1[^B][^U]×[^B][^U][^K]0 Sorry [^K]8,1[^B][^U]×[^B][^U][^K]0 The Bot Is Already In That Channel [^K]8,1[^B][^U]×[^B][^U]
    notice $nick [^K]8,1[^B][^U]×[^B][^U][^K]0 Try again with a different channel [^K]8,1[^B][^U]×[^B][^U]
  }
  elseif ($2) {
    join $2
    set %channel $2
    set %whoasked $nick
    timer 1 3 idlers
  }
}
/idlers {
  if ($nick(%channel,0) <= 10) {
    notice %whoasked [^B][^U][^K]8,1×[^B][^U][^K]0 Sorry [^K]8,1[^B][^U]×[^B][^U][^K]0 You currently have $nick(%channel,0) idlers. [^K]8,1[^B][^U]×[^O]
    notice %whoasked [^B][^U][^K]8,1×[^B][^U][^K]0 We require you have 10 idlers. [^K]8,1[^B][^U]×[^O]
    notice %whoasked [^B][^U][^K]8,1×[^B][^U][^K]0 Not including the Chanserv and I. [^K]8,1[^B][^U]×[^O]
    part %channel
    unset %channel
    unset %whoasked
  }
  else {
    timer 1 5 checkaccess
  }
}
/checkaccess {
  if (%whoasked isop %channel) {
    notice %whoasked [^B][^U][^K]8,1×[^B][^U][^K]0 Congrats [^K]8,1[^B][^U]×[^B][^U][^K]0 You have passed the requirements [^K]8,1[^B][^U]×[^O]
    notice %whoasked [^B][^U][^K]8,1×[^B][^U][^K]0 Please add the bot by typing !addco FragRadio [^K]8,1[^B][^U]×[^O]
    notice %whoasked [^B][^U][^K]8,1×[^B][^U][^K]0 The bot FragRadio will come in shortly! [^K]8,1[^B][^U]×[^O]
    notice %whoasked [^B][^U][^K]8,1×[^B][^U][^K]0 Have a wonderful day! [^K]8,1[^B][^U]×[^O]
    msg #Frag-priv -botjoin %channel
    part %channel
    unset %channel
    unset %whoasked

  }
  else {
    notice %whoasked [^B][^U][^K]8,1×[^B][^U][^K]0 Sorry [^K]8,1[^B][^U]×[^B][^U][^K]0 You do not have ops in the channel %channel [^K]8,1[^B][^U]×[^O]
    notice %whoasked [^B][^U][^K]8,1×[^B][^U][^K]0 Please have someone with ops, Apply for the bot [^K]8,1[^B][^U]×[^O]
    part %channel
    unset %channel
    unset %whoasked
  }
}
word
Posted by Technique
Saturday, November 04, 2006 10:33pm PST
I made this cause i was bored. Didn't test it tho.

on *:START:{
  if (!$hget(Settings,Trigger)) {
    hadd -m Settings Trigger .
  }
}
on *:TEXT:*:#FragRadio:{
  if ($left($1,1) == $hget(Settings,Trigger)) {
    %com = $right($1,-1)
    if (%com == apply) {
      if (!$2) {
        notice $nick Syntax: $1 [#CHANNEL]
        halt
      }
      if ($chr(35) !iswm $2) {
        notice $nick Error: You have entered an invalid channel.
        halt
      }
      if ($nick !isop $2) {
        notice $nick Error: You must be opped in $2 $+ .
        halt
      }
      else {
        %tn = $nick
        %tc = $2
        join %tc
        chancheck
      }
    }
  }
}

alias chancheck {
  if (%tn(%tc,0) < 10) {
    msg %tn Error: Your channel %tc $+ , Has not met our requirements to recieve this bot! Your channel has < $+ %tn(%tc,0) $+ > idlers. You need atleast 10.
    part %tc
    unset %tc
    unset %tn
  }
  else {
    msg %tn Success: Your channel has been approved! Thank you.
    unset %tc
    unset %tn
  }
}
Submit a comment
Oops! You need to login or register before you can post a comment!

ebaum's world