daily pastebin goal
79%
SHARE
TWEET

Multi-Bot invite system (Basic)

Seb Feb 6th, 2011 (edited) 614 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on *:LOAD:{
  2.   mkdir infos
  3.   writeini -n infos\settings.ini HubChan join $$?="Your Hub Channel (For debug and Staff)?"
  4.   writeini -n infos\settings.ini MainChan join $$?="Your Main Channel (For Public)?"
  5. }
  6.  
  7. on *:INVITE:#:{
  8.   if (%suspended. [ $+ [ # ] ] == 1) { .notice $nick 4***14[4Bot14] This channel is suspended, for info join $readini(infos\settings.ini,MainChan,join) |  halt }
  9.   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 }
  10.   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 }  
  11.   else {
  12.     set $+(%,inv.nick.,$chan) $nick
  13.     .msg $readini(infos\settings.ini,HubChan,join) $+(14[4,$nick,14]) Invited me to join:4 #
  14.     .notice $nick 4***14[4Bot14] Hello, I will join $chan in a moment, please hold!
  15.     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
  16.   }
  17. }
  18.  
  19. on *:JOIN:#:{
  20.   if ($chan == $readini(infos\settings.ini,Hubchan,join)) { halt }
  21.   if ($chan == $readini(infos\settings.ini,MainChan,join))  { halt }
  22.   if (%registered. [ $+ [ # ] ] == 1) { halt }
  23.   if ($nick !== $me) { halt }
  24.   if ($nick == $me && $($+(%,inv.nick.,$chan),2)) {
  25.     .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|
  26.     .timer 1 3 check.ppl $chan $($+(%,inv.nick.,$chan),2)
  27.     .timer 1 3 check.op $($+(%,inv.nick.,$chan),2) $chan
  28.     unset $+(%,inv.nick.,$chan)
  29.   }
  30. }
  31. on *:TEXT:!part bot:#:{
  32.   if ($nick isop $chan) || ($nick ishop $chan) {
  33.     .part # 4***14[4Bot14] Part requested by $nick
  34.     set -u300 %parted. [ $+ [ # ] ] $ticks
  35.     .msg $readini(infos\settings.ini,HubChan,join) 4***14[4Part14] $nick Requested a !part on # (Channel Suspended for 5mins)
  36.     halt
  37.   }
  38.   .msg # 4***14[4Error14] 14 To make me part you need to have 4@14 or 4%14!
  39. }
  40. on *:PART:#:{
  41.   if ($nick == $me) { halt }
  42.   if ($chan == $readini(infos\settings.ini,HubChan,join)) { halt }
  43.   if ($chan == $readini(infos\settings.ini,MainChan,join)) { halt }
  44.   check.ppl $chan
  45. }
  46.  
  47. on *:QUIT:{
  48.   if (%registered. [ $+ [ # ] ] == 1) { halt }
  49.   var %x = 1
  50.   while (%x <= $comchan($nick,0)) {
  51.     check.ppl $comchan($nick,%x)
  52.     inc %x
  53.   }
  54. }
  55. alias check.op {
  56.   if ($1 isop $2 || $1 ishop $2) { halt }
  57.   part $chan Invited by Non-Operator
  58.   .msg $readini(infos\settings.ini,HubChan,join) $+(14[4,$chan,14]) Status: 5Rejected I was invited by a non operator
  59. }
  60. alias check.ppl {
  61.   if (%registered. [ $+ [ $comchan($nick,%x) ] ] == 1) { halt }
  62.   if (%registered. [ $+ [ $1 ] ] == 1) { halt }
  63.   if ($nick($1,0) <= 3) {
  64.     part $1 4***14[4Bot14] 14You need at least4 2 14people to keep me
  65.     .msg $readini(infos\settings.ini,HubChan,join) $+(14[4,$2,14]) Status: 5Purged Less then 3 user in the room.
  66.     set -u60 %invited. [ $+ [ $1 ] ] $ticks
  67.     halt
  68.   }
  69.   if ($nick($1,0) >= 2) {
  70.     set %registered. [ $+ [ $1 ] ] 1
  71.     set %ajchans $addtok(%ajchans,$chan,44)
  72.     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
  73.     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.
  74.   }
  75. }
RAW Paste Data
Top