Seb icon

Multi-Bot invite system (Basic)

Seb | PRO | 02/06/11 05:09:16 PM UTC | 0 ⭐ | 1782 👁️ | Never ⏰ | []
mIRC |

3.63 KB

|

None

|

0 👍

/

0 👎

on *:LOAD:{
  mkdir infos
  writeini -n infos\settings.ini HubChan join $$?="Your Hub Channel (For debug and Staff)?"
  writeini -n infos\settings.ini MainChan join $$?="Your Main Channel (For Public)?"
}
 
on *:INVITE:#:{
  if (%suspended. [ $+ [ # ] ] == 1) { .notice $nick 4***14[4Bot14] This channel is suspended, for info join $readini(infos\settings.ini,MainChan,join) |  halt }
  if (%parted. [ $+ [ # ] ]) { .notice $nick 4***14[4Bot14] This channel is suspended due to a 4!part request, Time left untill Suspension removal4 $duration($var(parted. $+ $chan, 1).secs) $+ . |  halt }
  if (%invited. [ $+ [ # ] ]) { .notice $nick 4***14[4Bot14] This channel is suspended. I Was invited recently, please wait4 $duration($var(invited. $+ $chan, 1).secs) $+  and Try again after. |  halt }  
  else {
    set $+(%,inv.nick.,$chan) $nick
    .msg $readini(infos\settings.ini,HubChan,join) $+(14[4,$nick,14]) Invited me to join:4 # 
    .notice $nick 4***14[4Bot14] Hello, I will join $chan in a moment, please hold!
    scon -art1 if ($me != Hub) var $(%scid, 0) = $(%scid,0) $!chan(0) $!+ : $!+ $!cid | tokenize 32 %scid | scid $gettok($1, 2, 58) .timer 1 5 .join -n $chan
  }
}
 
on *:JOIN:#:{
  if ($chan == $readini(infos\settings.ini,Hubchan,join)) { halt }
  if ($chan == $readini(infos\settings.ini,MainChan,join))  { halt }
  if (%registered. [ $+ [ # ] ] == 1) { halt }
  if ($nick !== $me) { halt }
  if ($nick == $me && $($+(%,inv.nick.,$chan),2)) {
    .timer 1 1 msg $chan 4***14[4Bot14] 14I was invited by $($+(%,inv.nick.,$chan),2) 4|14 Verifying Channel Status... 4|14 Support Channel: 7#Ubot 4|
    .timer 1 3 check.ppl $chan $($+(%,inv.nick.,$chan),2)
    .timer 1 3 check.op $($+(%,inv.nick.,$chan),2) $chan
    unset $+(%,inv.nick.,$chan)
  }
}
on *:TEXT:!part bot:#:{
  if ($nick isop $chan) || ($nick ishop $chan) { 
    .part # 4***14[4Bot14] Part requested by $nick
    set -u300 %parted. [ $+ [ # ] ] $ticks
    .msg $readini(infos\settings.ini,HubChan,join) 4***14[4Part14] $nick Requested a !part on # (Channel Suspended for 5mins)
    halt 
  }
  .msg # 4***14[4Error14] 14 To make me part you need to have 4@14 or 4%14!
}
on *:PART:#:{ 
  if ($nick == $me) { halt }
  if ($chan == $readini(infos\settings.ini,HubChan,join)) { halt }
  if ($chan == $readini(infos\settings.ini,MainChan,join)) { halt }
  check.ppl $chan
} 
 
on *:QUIT:{
  if (%registered. [ $+ [ # ] ] == 1) { halt }
  var %x = 1
  while (%x <= $comchan($nick,0)) {
    check.ppl $comchan($nick,%x)
    inc %x
  }
}
alias check.op {
  if ($1 isop $2 || $1 ishop $2) { halt }
  part $chan Invited by Non-Operator
  .msg $readini(infos\settings.ini,HubChan,join) $+(14[4,$chan,14]) Status: 5Rejected I was invited by a non operator
}
alias check.ppl {
  if (%registered. [ $+ [ $comchan($nick,%x) ] ] == 1) { halt }
  if (%registered. [ $+ [ $1 ] ] == 1) { halt }
  if ($nick($1,0) <= 3) { 
    part $1 4***14[4Bot14] 14You need at least4 2 14people to keep me
    .msg $readini(infos\settings.ini,HubChan,join) $+(14[4,$2,14]) Status: 5Purged Less then 3 user in the room. 
    set -u60 %invited. [ $+ [ $1 ] ] $ticks
    halt
  }
  if ($nick($1,0) >= 2) { 
    set %registered. [ $+ [ $1 ] ] 1
    set %ajchans $addtok(%ajchans,$chan,44)
    msg $1 4***14[4Bot14] 14Status for $1 $+ :3 Passed! 4| 14Support Channel: 7 $+ $readini(infos\settings.ini,MainChan,join) 4|14 Forum: 7Coming Soon 
    msg $1 4***14[4Bot14] 14You Don't want me here?: 4!part Bot 14[7@14]. 4|7 $1 14Will be suspended for 5mins.
  }
}

Comments