Commits

Anonymous committed 6d93649

Keldair::Commands == fail;

  • Participants
  • Parent commits d7204b0

Comments (0)

Files changed (1)

 use IO::Handle;
 use IO::Select;
 use IO::Socket;
-use Keldair::Commands;
-
-@Keldair::ISA = ("Keldair::Commands");
 
 sub new {
     my ($package) = shift;
 
 # Keldair IRC commands, only commands for IRC usage follow.
 
+sub act {
+    my ( $target, $text ) = shift;
+    snd( "PRIVMSG " . $target . " :\001ACTION " . $text . "\001" );
+}
 
+sub ctcp {
+    my ( $target, $text ) = shift;
+    snd( "PRIVMSG " . $target . " :\001" . $text . "\001" );
+}
+
+sub kill {
+    my ( $target, $msg ) = shift;
+    snd("KILL $target :$msg");
+}
+
+sub msg {
+    my ( $target, $text ) = shift;
+    snd( "PRIVMSG " . $target . " :" . $text );
+}
+
+sub notice {
+    my ( $target, $text ) = shift;
+    snd( "NOTICE " . $target . " :" . $text );
+}
+
+sub oper {
+    my ( $name, $pass ) = shift;
+    snd( 'OPER ' . $name . ' ' . $pass );
+}
+
+sub snd {
+    my ($text) = shift;
+    chomp($text);
+    #send( $sock, $text . "\r\n", 0 );
+}
 
 1;