Top

IRC Bot Topic System


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  0.0 (of 0 scores)
Date Added  Oct 28, 2009
Last Updated  Oct 28, 2009
Tags  bot  function  irc  mirc  script  system  topic  winner 

Introduction

I'm sure many people have this already but I decided to upload it anyway...

It sets the topic for your channel on an IRC Network... i.e. General Chat | John is here | Today's winner is Dave! | #john on QuakeNet

It comes with a !winner function which chooses one person from the channel randomly... if the channel owner is doing it then it should set the winner in the topic as well... just say !tsync to make the winner in the topic change.

Please switch out YOURNICKHERE with your nick and YOURHOSTNAMEHERE with the part of your hostname after the @.

!topic - Changes the topic (Only Half-Ops and higher may do this) i.e. General Chat
!owner - Changes the name of the owner in the topic (Only a channel owner may do this) i.e. John
!verb - Changes the verb or word in the status (Only a channel owner may do this) i.e. is
!status - Changes the status in the topic (Only a channel owner may do this) i.e. here
!static - Changes the static part of the topic (Must be a SOP (Admin) or higher) i.e. #john on QuakeNet
!divider - Changes the divider that divides the parts of the topic (Must be a SOP (Admin) or higher) i.e. |
!tsync - Syncs the topic
!winner - Chooses one person from the channel randomly and gives the results (If the owner does this s/he can use !tsync to sync the winner to the topic)

If you find a bug, please tell me in a comment, thanks

Grab the Code

on *:TEXT:!topic*:#: {
  if ($nick ishop $chan || $nick isop $chan) {
    topic $chan $2- %divider %owner %verb %status %divider Today's winner is %winner $+ ! %divider %static
    set %topic $2-
    halt
    } else {
    notice $nick Permission denied... must have hop (+h) status or higher
  }
}
on *:TEXT:!chanowner*:#: {
  if ($nick == YOURNICKHERE) || ($address($nick,2) == @YOURHOSTNAMEHERE) {
    topic $chan %topic %divider $2 %verb %status %divider Today's winner is %winner $+ ! %divider %static
    set %owner $2
    halt
    } else {
    notice $nick Permission denied... must be a channel owner (+q)
  }
}
on *:TEXT:!verb*:#: {
  if ($nick == YOURNICKHERE) || ($address($nick,2) == @YOURHOSTNAMEHERE) {
    topic $chan %topic %divider %owner $2 %status %divider Today's winner is %winner $+ ! %divider %static
    set %verb $2
    halt
    } else {
    notice $nick Permission denied... must be a channel owner (+q)
  }
}
on *:TEXT:!status*:#: {
  if ($nick == YOURNICKHERE) || ($address($nick,2) == @YOURHOSTNAMEHERE) {
    topic $chan %topic %divider %owner %verb $2- %divider Today's winner is %winner $+ ! %divider %static
    set %status $2-
    halt
    } else {
    notice $nick Permission denied... must be a channel owner (+q)
  }
}
on *:TEXT:!static*:#: {
  if ($nick issop $chan) {
    topic $chan %topic %divider %owner %verb %status %divider Today's winner is %winner $+ ! %divider $2-
    set %static $2-
    halt
    } else {
    notice $nick Permission denied... must be a channel administrator (aka SOP - +ao) or higher
  }
}
on *:TEXT:!divider*:#: {
  if ($nick issop $chan) {
    topic $chan %topic $2 %owner %verb %status $2 Today's winner is %winner $+ ! $2 %static
    set %divider $2
    halt
    } else {
    notice $nick Permission denied... must be a channel administrator (aka SOP - +ao) or higher
  }
}
on *:TEXT:!tsync:#: {
  if ($nick ishop $chan || $nick isop $chan) {
    topic $chan %topic %divider %owner %verb %status %divider Today's winner is %winner $+ ! %divider %static
    halt
    } else {
    notice $nick Permission denied... must have hop (+h) status or higher
  }
}
on *:text:!winner:#: {
  set %nick1 $nick($chan,$rand(1,$nick($chan,0)))
  if (%nick1 == $me) { set %nick1 $nick($chan,$rand(1,$nick($chan,0))) }
  msg $chan The winner is %nick1 $+ ! Congrats %nick1 $+ ! :-)
  if ($nick == YOURNICKHERE) || ($address($nick,2) == @YOURHOSTNAMEHERE) {
    set %winner %nick1
  }
}

Comments

  (0)  RSS

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom