Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- print "Introducing, Caaz's shitty Wolfbot! Enjoy.\n";
- #chomp($Connect = <STDIN>);
- use lib '/Users/Caaz/lib';
- use POE::Component::IRC;
- use POE;
- use List::Util 'shuffle';
- BOTVARS: {
- $BotNick = "PerlWolf"; # Nick
- $BotUser = "Were"; # Username "indent"
- $BotName = "a Perl bot."; # Real Name
- $BotPass = "Pass"; # Nickserv Password
- $BotOwner = "Caaz"; # Owner of the Bot
- $BotPath = "/Users/Caaz/Desktop/Perl/BOT/"; # Path to any files.
- $BotVersion = POE::Component::IRC::Common::MAGENTA."\[ Werewolf 0 \]"; # Skeleton.Commands.Wwolf
- $WW{"Mode"} = "Off";
- }
- @WWRoles = ("Wolf!Darkrai!Troowl!Kira~", "Seer!Lucario!AnonymouStalker!L~", "Finder!Azelf!AnonymouSpy!Near", "Doppleganger!Ditto!Trap!Kira Supporter", "Angel!Cresslia!Bawxxy!Shinigami", "Village Idiot!Magikarp!Boxy!Mastuda", "Villager!Psyduck!Boxxy!ICPO agent");
- @Msg = (
- "A game of werewolf has begun! \"/msg ".$BotNick." join\" to well, join you idiot.:ELSE:A pokemon themed game of werewolf has started! \"/msg ".$BotNick." join\" to play!:ELSE:HAY THIS IS FROM BAWXXY TO YOU GUIZE, CAN YOU LIEK, FIND THE TROOWL? CAUSE I AM NO TROOWL, I AM BAWXXY YOU SEE? \"/msg ".$BotNick." join\" TO JOIN YAWL".
- ":ELSE:Deathnote themed werewolf has begun! \"/msg ".$BotNick." join\" to join.",
- " has joined.:ELSE: has joined.:ELSE: HAS JOINED THE BRAWL:ELSE: joins the ICPO.",
- "As the sun set, the villagers return to their homes, unknowing of when the wolf will strike next...:ELSE:The Pokemon, unable to stay awake much longer, fall asleep...:ELSE:AS EVERYONE GOES ONTO THE INTERBLAGZ, THE TROLL STAWLKS HIS PREY.:ELSE:The investigators keep an eye on the Kira murders as night falls...",
- "You are a wolf! At night, use \"/msg ".$BotNick." target NICK\" to kill your prey, or if it's a full moon, it turns them into a wolf!:ELSE:You are a Darkrai! At night, use \"/msg ".$BotNick." target NICK\" to make the Pokemon have nightmares!:ELSE:YOU IZ TROWL. \"/MSG ".$BotNick." target NAME\" KGO.".
- ":ELSE:You are Kira! use \"/msg ".$BotNick." target NICK\" to write them in your Deathnote.",
- "You are a seer! At night, use \"/msg ".$BotNick." target NICK\" to find out what role they play.:ELSE:You are a Lucario! At night, use \"/msg ".$BotNick." target NICK\" to find out what role they play.:ELSE:YOU ARE ANONYMOUS, YOU KNOW ALL. BUT FURST YOU MUST SEE ALL.\"/msg ".$BotNick." target NICK\"".
- ":ELSE:You are L! At night, you have the ability to see what roles the players play with \"/msg ".$BotNick." target NICK\".",
- "You are a finder! At night, use \"/msg ".$BotNick." target NICK\" to see if they've targeted anyone.:ELSE:You are an Azelf! At night, use \"/msg ".$BotNick." target NICK\" to see if they've targeted anyone.:ELSE:ANONYMOUS CAN ALSO FIND ALL \"/msg ".$BotNick." target NICK\"".
- ":ELSE:You are Near, At night, you can see who targeted who with \"/msg ".$BotNick." target NICK\".",
- "You are a doppleganger! At night, use \"/msg ".$BotNick." target NICK\" to transform into their role!:ELSE:You are a ditto! At night, use \"/msg ".$BotNick." target NICK\" to transform into their role!:ELSE:ANONYMOUS CAN BE ANYONE \"/msg ".$BotNick." target NICK\"".
- ":ELSE:You are a Kira Supporter! Pick a user and you get to be their role with \"/msg ".$BotNick." target NICK\".",
- "You are an Angel! At night, use \"/msg ".$BotNick." target NICK\" to protect them from being killed by the wolf!:ELSE:You are a Cresslia! At night, use \"/msg ".$BotNick." target NICK\" to protect them from being dragged into a nightmare!:ELSE:FUCK BEING ANGEL, BOXXY IS GAWD. \"/msg ".$BotNick." target NICK\"".
- ":ELSE:You are a shinigami! Use \"/msg ".$BotNick." target NICK\" to protect someone from being killed by the deathnote.",
- "You're a village idiot! You're main goal is to get Lynched. Kbestupid.:ELSE:You are a Magikarp! SPLASH. SPLASH AND TALK IN CAPS... you're main goal is to get caught!:ELSE:I WAZ GONNA MAKE BOXXY WOLF, BUT THEN MAKING HER IDIOT WOULD FUCK THE WHOLE THING. UP SO YEAH.".
- ":ELSE:You are Matsuda! If you get arrested for being Kira, you win!",
- "was killed by the wolf!:ELSE:is in a coma from nightmare!:ELSE:HAZ LEFT THE INTERBLAGZ DUE TO BEING TROLLED SO BADLY:ELSE:has died of a heart attack! Could this be the work of Kira?",
- "targeted:ELSE:targeted:ELSE:TARGATTED:ELSE:targeted",
- "Wolves are victorious!:ELSE:Darkrai has eliminated everyone!:ELSE:LOOL, YOU GUIZE GOT PWNED BY TROOWLZ:ELSE:Kira has one, and can continue making a wold based on his judgement.",
- "Villagers win! They've Lynched the wolfs!:ELSE:The Darkrai were stopped! Woo.:ELSE:HA YOU GUIZE GOT THE TROWL, BUT WHO WILL GET YOU?:ELSE:The ICPO wins! Ridding the world of Kira's judgement.",
- "was Lynched.:ELSE:Gawt caught!:ELSE:SAID CANDLEJACK ON ACCI\n:ELSE:was arrested for being Kira.",
- "Idiots win!:ELSE:Magikarp got caught, it wins!:ELSE:Aww damn, you arrested Matsuda!"
- );
- my ($irc) = POE::Component::IRC->spawn();
- POE::Session->create(inline_states => {
- _start => sub {
- $irc->yield(register => "all");
- $irc->yield( connect => {
- Nick => $BotNick,
- Username => $BotUser,
- Ircname => $BotName,
- Server => "irc.purplesurge.com",
- Port => "6667"
- });
- },
- irc_001 => sub {
- $irc->yield(mode => $BotNick." +B");
- #$irc->yield(privmsg => "Nickserv" => "id ".$BotPass);
- my $alarm_id = $irc->delay( [ join => "#Powerplant" ], 2 );
- },
- irc_error => sub {
- my ($kernel, $IRCWhat) = @_[KERNEL, ARG0];
- print $IRCWhat."\n";
- },
- irc_ctcp_action => sub {
- my ($kernel, $IRCWho, $where, $IRCWhat) = @_[KERNEL, ARG0, ARG1, ARG2];
- $IRCWhere = $where->[0];
- print GetTime()."$IRCWhere > * ".(split /!/, $IRCWho)[0]." $IRCWhat\n";
- Bot("ACTION",(split /!/, $IRCWho)[0],(split /!/, $IRCWho)[1],$IRCWhere,$IRCWhat);
- },
- irc_ctcp_version => sub {
- my ($kernel, $IRCWho, $where, $IRCWhat) = @_[KERNEL, ARG0, ARG1, ARG2];
- $IRCWhere = $where->[0];
- print GetTime()."CTCP > * Got CTCP VERSION from ".(split /!/, $IRCWho)[0]."\n";
- $irc->yield(ctcpreply => (split /!/, $IRCWho)[0] => $BotVersion);
- },
- irc_join => sub {
- my ($kernel, $IRCWho, $IRCWhere) = @_[KERNEL, ARG0, ARG1];
- print GetTime()."Join * ".(split /!/, $IRCWho)[0]." joins $IRCWhere\n";
- Bot("JOIN",(split /!/, $IRCWho)[0],(split /!/, $IRCWho)[1],$IRCWhere);
- },
- irc_invite => sub {
- my ($kernel, $IRCWho, $IRCWhere) = @_[KERNEL, ARG0, ARG1];
- print GetTime()."Invi * ".(split /!/, $IRCWho)[0]." invites you to $IRCWhere\n";
- Bot("INVITE", (split /!/, $IRCWho)[0],(split /!/, $IRCWho)[1],$IRCWhere);
- },
- irc_kick => sub {
- my ($kernel, $IRCWho, $IRCWhere, $IRCWhoElse, $IRCWhat) = @_[KERNEL, ARG0, ARG1, ARG2, ARG3];
- print GetTime()."Kick * ".(split /!/, $IRCWho)[0]." kicks $IRCWhoElse out of $IRCWhere ($IRCWhat)\n";
- Bot("KICK",(split /!/, $IRCWho)[0],(split /!/, $IRCWho)[1],$IRCWhere,$IRCWhoElse,$IRCWhat);
- },
- irc_msg => sub {
- my ($kernel, $IRCWho, $where, $IRCWhat) = @_[KERNEL, ARG0, ARG1, ARG2];
- $IRCWhere = $where->[0];
- print GetTime()."Priv\a> <".(split /!/, $IRCWho)[0]."> $IRCWhat\n";
- Bot("PRIVMSG",(split /!/, $IRCWho)[0],(split /!/, $IRCWho)[1],$IRCWhere,$IRCWhat);
- },
- irc_nick => sub {
- my ($kernel, $IRCWho, $IRCWhoElse) = @_[KERNEL, ARG0, ARG1];
- print GetTime()."Nick * ".(split /!/, $IRCWho)[0]." changes nick to $IRCWhoElse\n";
- Bot("NICK", (split /!/, $IRCWho)[0],(split /!/, $IRCWho)[1],$IRCWhoElse);
- },
- irc_notice => sub {
- my ($kernel, $IRCWho, $where, $IRCWhat) = @_[KERNEL, ARG0, ARG1, ARG2];
- $IRCWhere = $where->[0];
- print GetTime()."Noti <".(split /!/, $IRCWho)[0]."> $IRCWhat\n" if((split /!/, $IRCWho)[0] !~ /WolfBot/i);
- Bot("NOTICE",(split /!/, $IRCWho)[0],(split /!/, $IRCWho)[1],$IRCWhere,$IRCWhat);
- },
- irc_part => sub {
- my ($kernel, $IRCWho, $IRCWhere, $IRCWhat) = @_[KERNEL, ARG0, ARG1, ARG2];
- print GetTime()."Part * ".(split /!/, $IRCWho)[0]." left channel $IRCWhere \(".$IRCWhat."\)\n";
- Bot("PART",(split /!/, $IRCWho)[0],(split /!/, $IRCWho)[1],$IRCWhere,$IRCWhat);
- },
- irc_public => sub {
- my ($kernel, $IRCWho, $where, $IRCWhat) = @_[KERNEL, ARG0, ARG1, ARG2];
- $IRCWhere = $where->[0];
- print GetTime()."$IRCWhere > <".(split /!/, $IRCWho)[0]."> $IRCWhat\n";
- Bot("CHANMSG",(split /!/, $IRCWho)[0],(split /!/, $IRCWho)[1],$IRCWhere,$IRCWhat);
- },
- irc_disconnected => sub { print "Disconnected.\n"; exit 1; }, # Ends on disconnect.
- },);
- sub Bot {
- $Event = $_[0];
- if($Event =~ /CHANMSG/) { $Com = "privmsg ".$_[3]." "; $UserMsg = $_[4]; $Where = $_[3]; }
- elsif($Event =~ /NOTICE/) { $Com = "notice ".$_[1]." "; $UserMsg = $_[4]; $Where = $_[1]; }
- elsif($Event =~ /PRIVMSG/) { $Com = "notice ".$_[1]." "; $UserMsg = $_[4]; $Where = $_[1]; }
- elsif($Event =~ /INVITE/) { $Com = "notice ".$_[1]." "; $UserMsg = $_[3]; $Where = $_[1]; if ($UserMsg !~ /Spp/i) { $irc->yield(join => $UserMsg); }} # Joins on invite, if it's not spp. heh.
- elsif($Event =~ /JOIN/) { $Com = "notice ".$_[3]." "; $UserMsg = $_[3]; $Where = $_[1]; }
- elsif($Event =~ /NICK/) { if($_[1] =~ /^$BotOwner$/i) { print "Owner changing...\n"; $BotOwner = Nickit($_[3]) } }
- $UserNick = Nickit($_[1]);
- $UserHost = $_[2];
- $CurSec = SpamProtect();
- $UserMsg = POE::Component::IRC::Common::strip_formatting(POE::Component::IRC::Common::strip_color($UserMsg));
- if($Event =~ /(NOTICE|PRIVMSG)/) {
- #####################
- # Owner commands #
- #####################
- if($_[4] =~ /^~Do (.*)/i) {
- @rray = split / > /, $1;
- if($UserNick =~ /^$BotOwner$/i) {
- $irc->yield(@rray);
- }
- }
- #####################
- # Wwolf #
- #####################
- elsif($UserMsg =~ /^Start(.*)/i) {
- ($tring = $1) =~ s/ //gs;
- if($WW{"Mode"} =~ /Off/i) {
- if($tring =~ /^Pokemon$/i) {
- $WW{"Theme"} = 1;
- }
- elsif($tring =~ /^Boxxy$/i) {
- $WW{"Theme"} = 2;
- }
- elsif($tring =~ /^Deathnote$/i) {
- $WW{"Theme"} = 3;
- }
- else {
- $WW{"Theme"} = 0;
- }
- $WW{"Mode"} = "Starting";
- Command("privmsg #Powerplant ".(split /:ELSE:/, $Msg[0])[$WW{"Theme"}]);
- $Tmplayrs = join ":", @WWPlayers;
- ($Tmplayrs = $Tmplayrs.":".$UserNick) =~ s/^://gs;
- @WWPlayers = split /:/, $Tmplayrs;
- Command("privmsg #Powerplant ".$UserNick.(split /:ELSE:/, $Msg[1])[$WW{"Theme"}]);
- }
- }
- elsif($UserMsg =~ /^target (.*)/i) {
- $tring = Nickit($1);
- $Tmplayrs = ":".(join ":", @WWPlayers).":";
- if(($WW{"Mode"} =~ /Night/i) && ($Tmplayrs =~ /:${UserNick}:/i) && ($Tmplayrs =~ /:${tring}:/i)) {
- $Target{$UserNick} = $tring;
- Command($Com."You have set your target to ".$tring);
- }
- }
- elsif($UserMsg =~ /^vote (.*)/i) {
- $tring = Nickit($1);
- $Tmplayrs = ":".(join ":", @WWPlayers).":";
- if(($WW{"Mode"} =~ /Day/i) && ($Tmplayrs =~ /:${UserNick}:/i) && ($Tmplayrs =~ /:${tring}:/i)) {
- $Vote{$tring} = $Vote{$tring} + 1 + rand(0.5);
- Command("privmsg #Powerplant ".$tring." has been voted for!");
- }
- }
- elsif(($UserMsg =~ /^Join$/i) && ($WW{"Mode"} =~ /Starting/i) && ($Tmplayrs !~ /$UserNick/i)){
- $Tmplayrs = join ":", @WWPlayers;
- ($Tmplayrs = $Tmplayrs.":".$UserNick) =~ s/^://gs;
- @WWPlayers = split /:/, $Tmplayrs;
- Command("privmsg #Powerplant ".$UserNick.(split /:ELSE:/, $Msg[1])[$WW{"Theme"}]);
- }
- elsif(($UserMsg =~ /^Begin$/i) && ($WW{"Mode"} =~ /Starting/i)){
- &Begin();
- }
- elsif(($UserMsg =~ /^TimeDay$/i) && ($WW{"Mode"} =~ /Night/i)){
- &Day();
- }
- elsif(($UserMsg =~ /^TimeNight$/i) && ($WW{"Mode"} =~ /Day/i)){
- &Night();
- }
- elsif($UserMsg =~ /^Reset$/i){
- while ( ($key, $value) = each %WW ) {
- $WW{$key} = "";
- }
- $Tmplayrs = "";
- $WW{"Mode"} = "Off";
- @WWPlayers = ("");
- }
- #####################
- # END #
- #####################
- }
- }
- sub Begin {
- if(@WWPlayers >= 4) {
- Command("privmsg #Powerplant Enough players to start! Generating roles...");
- $Wolfs = int(@WWPlayers/4);
- foreach(@WWPlayers) {
- $WWRole{$_} = (split /!/, $WWRoles[6])[$WW{"Theme"}];
- }
- @WWPlayers = shuffle(@WWPlayers);
- $WWRole{$WWPlayers[0]} = (split /!/, $WWRoles[int(rand(@WWRoles))])[$WW{"Theme"}];
- @WWPlayers = shuffle(@WWPlayers);
- $WWRole{$WWPlayers[0]} = (split /!/, $WWRoles[int(rand(@WWRoles))])[$WW{"Theme"}];
- @WWPlayers = shuffle(@WWPlayers);
- $WWRole{$WWPlayers[0]} = (split /!/, $WWRoles[int(rand(@WWRoles))])[$WW{"Theme"}];
- while($Wolfs > 0) {
- @WWPlayers = shuffle(@WWPlayers);
- $WWRole{$WWPlayers[0]} = (split /!/, $WWRoles[0])[$WW{"Theme"}];
- $Wolfs--;
- }
- Command("privmsg #Powerplant If you got no notice, assume you are ".(split /!/, $WWRoles[6])[$WW{"Theme"}]);
- &Night();
- }
- else {
- Command("privmsg #Powerplant Not enough players ;o;");
- while ( ($key, $value) = each %WW ) {
- $WW{$key} = "";
- }
- $Tmplayrs = "";
- $WW{"Mode"} = "Off";
- @WWPlayers = ("");
- $Wolf=0;
- }
- }
- sub Night {
- $Lynch{"Name"} = "!";
- $Lynch{"Votes"} = 0;
- while ( ($key, $value) = each %Vote ) {
- if($Lynch{"Votes"} <= $value) {
- $Lynch{"Votes"} = $value;
- $Lynch{"Name"} = $key;
- }
- }
- if($Lynch{"Name"} !~ /!/) {
- Command("privmsg #Powerplant ".$Lynch{"Name"}." ".(split /:ELSE:/, $Msg[13])[$WW{"Theme"}]." ".$Lynch{"Name"}." was ".$WWRole{$Lynch{"Name"}}.".");
- if($WWRoles[5] =~ /$WWRole{$Lynch{"Name"}}/) {
- &End("Idiot");
- return 0
- }
- delete $WWRole{$Lynch{"Name"}};
- delete $Target{$Lynch{"Name"}};
- chomp(@WWPlayers = grep(!/^$Lynch{"Name"}$/i, @WWPlayers));
- }
- &RolesxPlayers();
- Command("privmsg #Powerplant ".(split /:ELSE:/, $Msg[2])[$WW{"Theme"}]);
- while ( ($key, $value) = each %WWRole ) {
- Command("notice ".$key." ".(split /:ELSE:/, $Msg[3])[$WW{"Theme"}]) if($WWRoles[0] =~ /$value/i);
- Command("notice ".$key." ".(split /:ELSE:/, $Msg[4])[$WW{"Theme"}]) if($WWRoles[1] =~ /$value/i);
- Command("notice ".$key." ".(split /:ELSE:/, $Msg[5])[$WW{"Theme"}]) if($WWRoles[2] =~ /$value/i);
- Command("notice ".$key." ".(split /:ELSE:/, $Msg[6])[$WW{"Theme"}]) if($WWRoles[3] =~ /$value/i);
- Command("notice ".$key." ".(split /:ELSE:/, $Msg[7])[$WW{"Theme"}]) if($WWRoles[4] =~ /$value/i);
- Command("notice ".$key." ".(split /:ELSE:/, $Msg[8])[$WW{"Theme"}]) if($WWRoles[5] =~ /$value/i);
- }
- $WW{"Mode"} = "Night";
- }
- sub Day {
- while ( ($key, $value) = each %Target ) {
- Command("privmsg #Powerplant ".$value." ".(split /:ELSE:/, $Msg[9])[$WW{"Theme"}]." ".$value." was ".$WWRole{$value}.".") if($WWRoles[0] =~ /$WWRole{$key}/i);
- delete $WWRole{$value} if($WWRoles[0] =~ /$WWRole{$key}/i);
- delete $Target{$value} if($WWRoles[0] =~ /$WWRole{$key}/i);
- chomp(@WWPlayers = grep(!/^$value$/i, @WWPlayers)) if($WWRoles[0] =~ /$WWRole{$key}/i);
- Command("notice ".$key." ".$value." is ".$WWRole{$value}) if($WWRoles[1] =~ /$WWRole{$key}/i);
- Command("notice ".$key." ".(split /:ELSE:/, $Msg[10])[$WW{"Theme"}]." ".$Target{$key}) if($WWRoles[2] =~ /$WWRole{$key}/i);
- Command("notice ".$key." You turn into ".$WWRole{$value}) if($WWRoles[3] =~ /$WWRole{$key}/i);
- $WWRole{$key} = $WWRole{$value} if($WWRoles[3] =~ /$WWRole{$key}/i);
- }
- while ( ($key, $value) = each %Target ) {
- delete $Target{$key};
- }
- &RolesxPlayers();
- Command("privmsg #Powerplant It is now Daytime, here's the part where you vote.");
- $WW{"Mode"} = "Day";
- }
- sub RolesxPlayers {
- $tring = "";
- while ( ($key, $value) = each %WWRole ) {
- $Count{$value}++;
- if($WWRoles[0] =~ /$value/i) {
- $Wolf++;
- }
- else {
- $Vill++;
- }
- }
- while ( ($key, $value) = each %Count ) {
- $tring = $tring.$key." x".$value.", ";
- }
- $tring =~ s/, $//gs;
- Command("privmsg #Powerplant Living players, ".@WWPlayers." : ".(join ", ", @WWPlayers).".");
- Command("privmsg #Powerplant Active roles, ".$tring.".");
- $tring = "";
- while ( ($key, $value) = each %Count ) {
- delete $Count{$key};
- }
- if($Wolf == 0) { &End("Vill"); }
- elsif($Vill == 1) { &End("Wolf"); }
- $Wolf = 0;
- $Vill = 0;
- }
- sub End {
- if($_[0] =~ /Wolf/) {
- Command("privmsg #Powerplant ".(split /:ELSE:/, $Msg[11])[$WW{"Theme"}]);
- while ( ($key, $value) = each %WW ) {
- $WW{$key} = "";
- }
- $Tmplayrs = "";
- $WW{"Mode"} = "Off";
- @WWPlayers = ("");
- $Wolf=0;
- }
- if($_[0] =~ /Idiot/) {
- Command("privmsg #Powerplant ".(split /:ELSE:/, $Msg[14])[$WW{"Theme"}]);
- while ( ($key, $value) = each %WW ) {
- $WW{$key} = "";
- }
- $Tmplayrs = "";
- $WW{"Mode"} = "Off";
- @WWPlayers = ("");
- $Wolf=0;
- }
- else {
- Command("privmsg #Powerplant ".(split /:ELSE:/, $Msg[12])[$WW{"Theme"}]);
- while ( ($key, $value) = each %WW ) {
- $WW{$key} = "";
- }
- $Tmplayrs = "";
- $WW{"Mode"} = "Off";
- @WWPlayers = ("");
- $Wolf=0;
- }
- }
- sub SpamProtect {
- my($Sec, $Min, $Hour, $Day, $mon, $year, $WDay, $YDay) = localtime;
- return (((($YDay * 24) * 60) * 60) + (($Hour * 60) * 60) + ($Min * 60) + $Sec);
- }
- sub Regexit {
- ($Reg = $_[0]) =~ s/\\/\\\\/gs;
- $Reg =~ s/(\?|\(|\)|\||\[|\|\.)/\\$1/gs;
- $Reg =~ s/\*/\(\.\*\)/gs;
- return $Reg;
- }
- sub Nickit {
- ($Reg = $_[0]) =~ s/\\/_/gs;
- $Reg =~ s/(\?|\(|\)|\||\[|\|\{|\}|\.)/_/gs;
- return $Reg;
- }
- sub Command {
- $PrivmsgA = $_[0];
- @PrivmsgB = split / /, $PrivmsgA;
- $ComA = shift(@PrivmsgB);
- $ComB = shift(@PrivmsgB);
- if($BotNick =~ /Luka/i) { $BotFont = "〜"; $irc->yield($ComA => $ComB => POE::Component::IRC::Common::MAGENTA.(join " ", @PrivmsgB)." 〜"); }
- else { $irc->yield($ComA => $ComB => POE::Component::IRC::Common::TEAL.(join " ", @PrivmsgB).""); }
- }
- sub GetTime { # This is just for timestamps, just leave it.
- my($Sec, $Min, $Hour, $Day, $Mon, $Year, $WDay, $YDay) = localtime;
- my $APM = "AM";
- if($Hour > 12) { $Hour -= 12; $APM = "PM"; }
- if($Hour < 10) { $Hour = "0".$Hour; }
- if($Min < 10) { $Min = "0".$Min; }
- if($Sec < 10) { $Sec = "0".$Sec; }
- return "[ $Hour:$Min:$Sec $APM ] ";
- }
- # Caaz was here.
- $poe_kernel->run();
- exit 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement