estream apply
Posted by chriscloyd
Friday, February 02, 2007
Description: yaya

on *:TEXT:@apply*:#eStream:{
  if (!$2) {
    notice $nick You must add a channel
    notice $nick Example ( .apply #eStream )
    halt
  }
  if ($2 == #eStream) {
    notice $nick Sorry we are already in this channel
    notice $nick Try again
    halt
  }
  if ($2) {
    join $2
    set %channel $2
    timer 1 3 checkidlers
  }
}
/idlers {
  if ($nick(%channel,0) <= 42) {
    notice %whoasked You currently have $nick(%channel,0) idlers.
    notice %whoasked We require you have 40 idlers but this is a test.
    notice %whoasked Not including the Chanserv and I
    part %channel
    timer 1 5 checkaccess
  }
}
/checkaccess {
  if (%whoasked isop %channel) {
    notice %whoasked Congrats you have passed the requirements
    notice %whoasked Please add the bot by typing !addco eStream
    notice %whoasked Have a wonderful day!
  }
  else {
    notice %whoasked You do not have ops in the channel %channel
    notice %whoasked Please have someone with ops apply for the bot
    part %channel
    unset %channel
    unset %whoasked
  }
}
allrite script
Posted by eXile
Saturday, February 10, 2007 01:44am PST
good script but what would happen if the bot is in too many channels. well if you are a script kiddie i would say that it is a good script :)
Didn't test
Posted by Technique
Sunday, July 29, 2007 05:34am PDT
Didn't test but looks kinda correct lol.
on *:START:{
  hadd -m Channels #Channel
  hadd -m Settings Trigger .
}
on *:TEXT:*:?:{
  if ($left($1,1) == $hget(Settings,Trigger)) {
    %com = $right($1,-1)
    if (%com == apply) {
      if (!$2) {
        msg $nick Syntax: $1 [#CHANNEL]
        halt
      }
      if ($hget(Channels,$2)) {
        msg $nick Error: $2 is already a registered channel.
        halt
      }
      if (*#* !iswm $left($2,1)) {
        msg $nick Error: You have entered an invalid channel.
        halt
      }
      else {
        hadd -m Apply Nick $nick
        hadd -m Apply Chan $2
        checkstatus
      }
    }
  }
}
alias checkstatus {
  cs a $hget(Apply,Chan) $hget(Apply,Nick)
    if ($hget(Apply,Access) <= 300) {
      msg # You don't have enough access to get a bot!
      hfree apply
    }
    if ($hget(Apply,nick($hget(Apply,Chan,0) <= 40)) {
      msg # You don't have enough idlers to get a bot!
      hfree apply
    }
    else {
      join $hget(Apply,Chan)
      msg # Success! You have recieved a bot!
      hadd -m Channels $hget(Apply,Chan)
      hfree apply
    }
}
on *:NOTICE:{
  if ($nick == ChanServ) {
    hadd -m Apply Access $5
  }
}
on *:CONNECT:{
  unset %z
  unset %x
  %x = 1
    while (%x <= $hget(Channels,0).item) {
      %z = $hget(Channels,%x).item
      inc %x
    }
    join %z
}
Submit a comment
Oops! You need to login or register before you can post a comment!

ebaum's world