Request/Advertisement Bot

By plesh on Mar 24, 2008

This script was my first one, designed for my needs very simple and basic to do, what it does is people can request it into there channels and the admin can force it to join channels, when somebody requests it they just type !Request #Channel and so on and so, it has invalid syntax options aswell if you enter things incorrect its realy simple to use.
Just fill in the things that it says e.g. YOUR NICKNAME HERE etc etc

-:Commands:-

!Request #Channel
!help

-:Admin Commands:-
!Join #Channel (forces the bot to join a channel)
!Part #Channel (forces the bot to leave a channel)
!Advertise (Advertise the message entered)
!Help2 (Admin Help Commands)
!Accept (Accepts the channel requested)
!Decline (Declines the channel)

-:Features:-
It also has a blacklist so it wont join important channels.

Also it has a que, so people cant all request at the same time, it deals with one at a time.

If you have any problems with this script, or things you would like added on please tell me.

As usual you just copy and paste this into mIRC Script editor in 'Remote'

Cheers

on *:text:!*:#chan: {
  if ($1 == !request) {
    if (0,0 isin $2) { .notice $nick #0,0 is blacklisted - Request Denied | halt }
    if ($timer(halt)) { .notice $nick anti spam you have to wait $duration($timer(halt).secs)) | halt }
    if ($istok($blacklist,$gettok($2,1,44),32) == $true) { .notice $nick channel $gettok($2,1,44) is blacklisted - Request denied | halt }
    if (!$2) { .notice $nick You forgot to type what channel to request your bot to. Syntax for requesting is !request #channel | halt }
    if (%r.hold == on) { .notice $nick please wait $nick there's already a request goin on | halt }
    set %r.nick $nick | set %r.chan $2 | set %r.hold on
    msg NICKNAMEHERE $nick Requested me to join channel %r.chan $+ , In the main channel type !accept or !decline |  msg NICKNAMEHERE $nick Requested me to join channel %r.chan $+ , In the main channel type !accept or !decline
    .notice %r.nick Please wait for an admin to review your request.
  }
  if ($1 == !accept) && ($2 != %r.chan) {
    if ($nick == $ial(*!*HOSTNAMEHERE,1).nick) || ($nick == $ial(*!*HOSTNAMEHERE,1).nick) {
      msg #CHANNELNAME HERE %r.nick your request has been 3[ACCEPTED] by $nick for channel %r.chan $+ .
      join %r.chan
      .timermsgchan1 1 1 msg %r.chan I am $me From CHANNELNAME WHERE BOT IS HOSTED, Join it and !Request me. Please Idle/Support, If you need help type !help [All Commands Are Done From CHANNEL NAME]
      .timermsgchan2 1 2 unset %r.*
      .timerhalt 1 17 echo
    }
    else { .notice $nick [Access Denied] You are Not a System Operator }
  }
  if ($1 == !decline) && ($nick isop $chan) && ($2 != %r.chan) {
    if ($nick == $ial(*!*HOSTNAMEHERE,1).nick) || ($nick == $ial(*!*HOSTNAMEHERE,1).nick) {
      msg #plesh %r.nick your request has been 4[DENIED] by $nick for channel %r.chan $+ . 
      .timerhalt 1 15 echo
      unset %r.*   
    }
    else { .notice $nick [Access Denied] You are Not a System Operator }
  }
  if ($1 == !join) {
    if ($nick == $ial(*!*HOSTNAMEHERE,1).nick) || ($nick == $ial(*!*HOSTNAMEHERE,1).nick) {
      if ($timer(halt2)) { .notice $nick anti spam you have to wait $duration($timer(halt2).secs)) | halt }
      if (!$2) { .notice $nick Syntax for join is !join #channel | halt }
      msg $chan $nick forced me to join $2 
      join $2 
      .timerhalt2 1 15 echo
    }
    else { .notice $nick [Access Denied] You are Not a System Operator } 
  }
  if ($1 == !part) {
    if ($nick == $ial(*!*HOSTNAMEHERE,1).nick) || ($nick == $ial(*!*HOSTNAMEHERE,1).nick) {
      if ($timer(halt3)) { .notice $nick anti spam you have to wait $duration($timer(halt3).secs)) | halt }
      if (!$2) { .notice $nick Syntax for join is !part #channel | halt }
      msg $chan $nick forced me to part $2 
      part $2 
      .timerhalt3 1 15 echo
    } 
  }
  if ($1 == !advertise) {  
    if ($nick == $ial(*!*HOSTNAMEHERE,1).nick) || ($nick == $ial(*!*HOSTNAMEHERE,1).nick) { 
      chanspam 
    }
    else { .notice $nick [Access Denied] You are Not a System Operator }
  }
  if ($1 == !help) && ($nick isop $chan) { .notice $nick The BOT Commands Are !Request #channel and !Part #channel. }
  if ($1 == !help2) {
    if ($nick == $ial(*!*HOSTNAMEHERE,1).nick) || ($nick == $ial(*!*HOSTNAMEHERE1).nick) { 
      .notice $nick  Commands !join #channel, !part #channel, !advertise -- this triggers your spam msg in all channels, !accept #channel -- when someone requests, !decline #channel -- when someone requests
    }
    else { .notice $nick [Access Denied] You are Not a System Operator }
  }
}

on *:connect: { .timerspamchans 1 3600 spamchans }
alias -l udelad { return #CHANNEL NAME HERE }
alias blacklist { return #help #feds #help.script #0,0 }
alias chanspam {
  var %i = 1
  while (%i <= $chan(0)) {
    if ($chan(%i) !isin $udelad) { msg $chan(%i) PUT YOUR SPAM MESSAGE HERE }
    inc %i
  }
  .timerspamchans 1 3600 spamchans
}

Comments

Sign in to comment.
hackmaster   -  Sep 15, 2009

"msg #plesh %r.nick your request has been 4[DENIED] by $nick for channel %r.chan $+ ."
remove #plesh to your chan if some of u havent noticed that

 Respond  
^Neptune   -  Mar 25, 2008

I haven\'t had the chance to test it, but the code all looks good.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.