Author: Fish
Date: Tue Aug 2 22:49:37 2005
New Revision: 2687
Modified:
trunk/ChangeLog
trunk/modules/perltest/test.pl
trunk/src/NeoStats.pm
trunk/src/ircsend.c
trunk/src/neostats.pm.h
trunk/src/perl.c
Log:
W0000000p. Perl Modules Now pretty much work. Few Minor bugs left to sort out though. Now, Where is my beer?
Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog (original)
+++ trunk/ChangeLog Tue Aug 2 22:49:37 2005
@@ -4,6 +4,8 @@
Fish (F), Mark (M), DeadNotBuried (D)
===============================================================================
* NeoStats * Version 3.0.a3-dev
+ - Perl Module Support now has most functionality of standard C Modules.
+ Need to fix up NeoStats.pm to do lots of sanity checking first though (F)
- Fix a crash on shutdown in nsdba relating to not statically storing the hash key (F)
- add missing modules lines to makeconf (D)
- increase module limit to 40 (D)
Modified: trunk/modules/perltest/test.pl
==============================================================================
--- trunk/modules/perltest/test.pl (original)
+++ trunk/modules/perltest/test.pl Tue Aug 2 22:49:37 2005
@@ -338,10 +338,10 @@
# add a command
- my @helptext = ('Test Command Help', 'Test', 'Testing Command Help is a nice command');
+ my @helptext = ('Test Perl Module Interface', 'This Command Tests the Perl Module Interface', 'By Executing several of the Perl API commands against you (but it wont kill you!)');
my $cmd = {
- cmd => 'test',
- minparams => '1',
+ cmd => 'TESTAPI',
+ minparams => '0',
ulevel => '0',
flags => '0',
};
@@ -363,6 +363,30 @@
my ($cmd, $who, $params) = @_;
NeoStats::debug("Got $cmd Command from $who: $params ");
NeoStats::PrefMsg($bot, $who, "You Sent me this: $params");
+
+ # Now Exercise the perl Module API
+ NeoStats::ChanAlert($bot, "PrivMsg: ".NeoStats::PrivMsg($bot, $who, "Testing PrivMsg"));
+ NeoStats::ChanAlert($bot, "Notice: ".NeoStats::Notice($bot, $who, "Testing Notice"));
+ NeoStats::ChanAlert($bot, "ChanPrivMsg: ".NeoStats::ChanPrivMsg($bot, "#services", "Testing ChanPrivMsg"));
+ NeoStats::ChanAlert($bot, "ChanNotice: ".NeoStats::ChanNotice($bot, "#services", "Testing ChanNotice"));
+ NeoStats::ChanAlert($bot, "Globops: ".NeoStats::Globops($bot, "Testing Globops"));
+ NeoStats::ChanAlert($bot, "Wallops: ".NeoStats::Wallops($bot, "Testing Wallops"));
+ NeoStats::ChanAlert($bot, "Numeric: ".NeoStats::Numeric(123, $who, "Testing Numeric"));
+ #XXX Todo to define UMODES
+ NeoStats::ChanAlert($bot, "Umode: ".NeoStats::Umode($bot, $bot, 0));
+ NeoStats::ChanAlert($bot, "Join: ".NeoStats::Join($bot, "#testing", "+t"));
+ NeoStats::ChanAlert($bot, "Invite: ".NeoStats::Invite($bot, "#testing", $who));
+ NeoStats::ChanAlert($bot, "SvsJoin: ".NeoStats::SvsJoin($bot, $who, "#testing"));
+ NeoStats::ChanAlert($bot, "CMode: ".NeoStats::SvsJoin($bot, "#testing", "+nl", "10"));
+ NeoStats::ChanAlert($bot, "ChanUserMode: ".NeoStats::ChanUserMode($bot, "#testing", "+o", $who));
+ NeoStats::ChanAlert($bot, "Topic: ".NeoStats::Topic($bot, "#testing", "My Lovely Topic"));
+ NeoStats::ChanAlert($bot, "Kick: ".NeoStats::Kick($bot, "#testing", $who, "Cause I like Kicks"));
+ NeoStats::ChanAlert($bot, "Part: ".NeoStats::Part($bot, "#testing", "Its a Boring Channel"));
+ NeoStats::ChanAlert($bot, "NickChange: ".NeoStats::NickChange($bot, "NewNick"));
+ NeoStats::ChanAlert($bot, "NickChange: ".NeoStats::NickChange("NewNick", $bot));
+ NeoStats::ChanAlert($bot, "Finished. All Commands Should have returned 1");
+
+
return NeoStats::NS_SUCCESS;
}
Modified: trunk/src/NeoStats.pm
==============================================================================
--- trunk/src/NeoStats.pm (original)
+++ trunk/src/NeoStats.pm Tue Aug 2 22:49:37 2005
@@ -267,6 +267,304 @@
return NeoStats::Internal::ChanAlert($bot, $message);
}
+ sub PrivMsg {
+ if (@_ < 3) {
+ NeoStats::debug("Invalid Number of arguments to PrivMsg");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $to = shift;
+ my $message = shift;
+ return NeoStats::Internal::PrivMsg($bot, $to, $message);
+ }
+
+ sub Notice {
+ if (@_ < 3) {
+ NeoStats::debug("Invalid Number of arguments to Notice");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $to = shift;
+ my $message = shift;
+ return NeoStats::Internal::Notice($bot, $to, $message);
+ }
+
+ sub ChanPrivMsg {
+ if (@_ < 3) {
+ NeoStats::debug("Invalid Number of arguments to ChanPrivMsg");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $to = shift;
+ my $message = shift;
+ return NeoStats::Internal::ChanPrivMsg($bot, $to, $message);
+ }
+
+ sub ChanNotice {
+ if (@_ < 3) {
+ NeoStats::debug("Invalid Number of arguments to ChanNotice");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $to = shift;
+ my $message = shift;
+ return NeoStats::Internal::ChanNotice($bot, $to, $message);
+ }
+
+ sub Globops {
+ if (@_ < 2) {
+ NeoStats::debug("Invalid Number of arguments to Globops");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $message = shift;
+ return NeoStats::Internal::Globops($bot, $message);
+ }
+
+ sub Wallops {
+ if (@_ < 2) {
+ NeoStats::debug("Invalid Number of arguments to Wallops");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $message = shift;
+ return NeoStats::Internal::Globops($bot, $message);
+ }
+
+ sub Numeric {
+ if (@_ < 3) {
+ NeoStats::debug("Invalid Number of arguments to Numeric");
+ return NeoStats::NS_FAILURE;
+ }
+ my $numeric = shift;
+ my $target = shift;
+ my $message = shift;
+ return NeoStats::Internal::Numeric($numeric, $target, $message);
+ }
+
+ sub Umode {
+ if (@_ < 3) {
+ NeoStats::debug("Invalid Number of arguments to Umode");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $target = shift;
+ my $umode = shift;
+ return NeoStats::Internal::Umode($bot, $target, $umode);
+ }
+
+ sub Join {
+ if (@_ < 3) {
+ NeoStats::debug("Invalid Number of arguments to Cmode");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $channel = shift;
+ my $cmode = shift;
+ return NeoStats::Internal::Join($bot, $channel, $cmode);
+ }
+
+ sub Part {
+ if (@_ < 2) {
+ NeoStats::debug("Invalid Number of arguments to Part");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $channel = shift;
+ my $message = shift;
+ return NeoStats::Internal::Part($bot, $channel, $message);
+ }
+
+ sub NickChange {
+ if (@_ < 2) {
+ NeoStats::debug("Invalid Number of arguments to NickChange");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $newnick = shift;
+ return NeoStats::Internal::NickChange($bot, $newnick);
+ }
+
+ sub CMode {
+ if (@_ < 3) {
+ NeoStats::debug("Invalid Number of arguments to CMode");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $chan = shift;
+ my $modes = shift;
+ my $args = shift;
+ return NeoStats::Internal::CMode($bot, $chan, $modes, $args);
+ }
+
+ sub ChanUserMode {
+ if (@_ < 4) {
+ NeoStats::debug("Invalid Number of arguments to ChanUserMode");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $chan = shift;
+ my $modes = shift;
+ my $target = shift;
+ return NeoStats::Internal::ChanUserMode($bot, $chan, $modes, $target);
+ }
+
+ sub Kill {
+ if (@_ < 3) {
+ NeoStats::debug("Invalid Number of arguments to Kill");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $target = shift;
+ my $reason = shift;
+ return NeoStats::Internal::Kill($bot, $target, $reason);
+ }
+
+ sub Kick {
+ if (@_ < 3) {
+ NeoStats::debug("Invalid Number of arguments to Kick");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $chan = shift;
+ my $target = shift;
+ my $reason = shift;
+ return NeoStats::Internal::Kick($bot, $chan, $target, $reason);
+ }
+
+ sub Invite {
+ if (@_ < 3) {
+ NeoStats::debug("Invalid Number of arguments to Invite");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $chan = shift;
+ my $target = shift;
+ return NeoStats::Internal::Invite($bot, $chan, $target);
+ }
+
+ sub Topic {
+ if (@_ < 3) {
+ NeoStats::debug("Invalid Number of arguments to Topic");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $chan = shift;
+ my $topic = shift;
+ return NeoStats::Internal::Topic($bot, $chan, $topic);
+ }
+
+ sub SvsKill {
+ if (@_ < 3) {
+ NeoStats::debug("Invalid Number of arguments to SvsKill");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $target = shift;
+ my $reason = shift;
+ return NeoStats::Internal::SvsKill($bot, $target, $reason);
+ }
+
+ sub SvsMode {
+ if (@_ < 3) {
+ NeoStats::debug("Invalid Number of arguments to SvsMode");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $target = shift;
+ my $mode = shift;
+ return NeoStats::Internal::SvsKill($bot, $target, $mode);
+ }
+
+ sub SvsHost {
+ if (@_ < 3) {
+ NeoStats::debug("Invalid Number of arguments to SvsHost");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $target = shift;
+ my $host = shift;
+ return NeoStats::Internal::SvsHost($bot, $target, $host);
+ }
+
+ sub SvsJoin {
+ if (@_ < 3) {
+ NeoStats::debug("Invalid Number of arguments to SvsJoin");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $target = shift;
+ my $chan = shift;
+ return NeoStats::Internal::SvsJoin($bot, $target, $chan);
+ }
+
+ sub SvsPart {
+ if (@_ < 3) {
+ NeoStats::debug("Invalid Number of arguments to SvsPart");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $target = shift;
+ my $chan = shift;
+ return NeoStats::Internal::SvsPart($bot, $target, $chan);
+ }
+
+ sub Swhois {
+ if (@_ < 2) {
+ NeoStats::debug("Invalid Number of arguments to Swhois");
+ return NeoStats::NS_FAILURE;
+ }
+ my $target = shift;
+ my $swhois = shift;
+ return NeoStats::Internal::Swhois($target, $swhois);
+ }
+
+ sub SvsNick {
+ if (@_ < 3) {
+ NeoStats::debug("Invalid Number of arguments to SvsNick");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $target = shift;
+ my $newnick = shift;
+ return NeoStats::Internal::SvsNick($bot, $target, $newnick);
+ }
+
+ sub SMO {
+ if (@_ < 3) {
+ NeoStats::debug("Invalid Number of arguments to SMO");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $umodetarget = shift;
+ my $message = shift;
+ return NeoStats::Internal::SMO($bot, $umodetarget, $message);
+ }
+
+ sub Akill {
+ if (@_ < 5) {
+ NeoStats::debug("Invalid Number of arguments to SMO");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $host = shift;
+ my $ident = shift;
+ my $length = shift;
+ my $message = shift;
+ return NeoStats::Internal::Akill($bot, $host, $ident, $length, $message);
+ }
+
+ sub Rakill {
+ if (@_ < 3) {
+ NeoStats::debug("Invalid Number of arguments to SMO");
+ return NeoStats::NS_FAILURE;
+ }
+ my $bot = shift;
+ my $host = shift;
+ my $ident = shift;
+ return NeoStats::Internal::Rakill($bot, $host, $ident);
+ }
+
sub debug {
my $text = shift @_;
Modified: trunk/src/ircsend.c
==============================================================================
--- trunk/src/ircsend.c (original)
+++ trunk/src/ircsend.c Tue Aug 2 22:49:37 2005
@@ -1169,7 +1169,7 @@
return NS_SUCCESS;
}
-/** @brief irc_invite
+/** @brief irc_topic
*
* @return NS_SUCCESS if succeeds, NS_FAILURE if not
*/
Modified: trunk/src/neostats.pm.h
==============================================================================
--- trunk/src/neostats.pm.h (original)
+++ trunk/src/neostats.pm.h Tue Aug 2 22:49:37 2005
@@ -267,6 +267,304 @@
"return NeoStats::Internal::ChanAlert($bot, $message);\n"
"}\n"
"\n"
+"sub PrivMsg {\n"
+"if (@_ < 3) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to PrivMsg\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $to = shift;\n"
+"my $message = shift;\n"
+"return NeoStats::Internal::PrivMsg($bot, $to, $message);\n"
+"}\n"
+"\n"
+"sub Notice {\n"
+"if (@_ < 3) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to Notice\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $to = shift;\n"
+"my $message = shift;\n"
+"return NeoStats::Internal::Notice($bot, $to, $message);\n"
+"}\n"
+"\n"
+"sub ChanPrivMsg {\n"
+"if (@_ < 3) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to ChanPrivMsg\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $to = shift;\n"
+"my $message = shift;\n"
+"return NeoStats::Internal::ChanPrivMsg($bot, $to, $message);\n"
+"}\n"
+"\n"
+"sub ChanNotice {\n"
+"if (@_ < 3) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to ChanNotice\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $to = shift;\n"
+"my $message = shift;\n"
+"return NeoStats::Internal::ChanNotice($bot, $to, $message);\n"
+"}\n"
+"\n"
+"sub Globops {\n"
+"if (@_ < 2) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to Globops\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $message = shift;\n"
+"return NeoStats::Internal::Globops($bot, $message);\n"
+"}\n"
+"\n"
+"sub Wallops {\n"
+"if (@_ < 2) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to Wallops\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $message = shift;\n"
+"return NeoStats::Internal::Globops($bot, $message);\n"
+"}\n"
+"\n"
+"sub Numeric {\n"
+"if (@_ < 3) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to Numeric\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $numeric = shift;\n"
+"my $target = shift;\n"
+"my $message = shift;\n"
+"return NeoStats::Internal::Numeric($numeric, $target, $message);\n"
+"}\n"
+"\n"
+"sub Umode {\n"
+"if (@_ < 3) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to Umode\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $target = shift;\n"
+"my $umode = shift;\n"
+"return NeoStats::Internal::Umode($bot, $target, $umode);\n"
+"}\n"
+"\n"
+"sub Join {\n"
+"if (@_ < 3) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to Cmode\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $channel = shift;\n"
+"my $cmode = shift;\n"
+"return NeoStats::Internal::Join($bot, $channel, $cmode);\n"
+"}\n"
+"\n"
+"sub Part {\n"
+"if (@_ < 2) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to Part\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $channel = shift;\n"
+"my $message = shift;\n"
+"return NeoStats::Internal::Part($bot, $channel, $message);\n"
+"}\n"
+"\n"
+"sub NickChange {\n"
+"if (@_ < 2) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to NickChange\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $newnick = shift;\n"
+"return NeoStats::Internal::NickChange($bot, $newnick);\n"
+"}\n"
+"\n"
+"sub CMode {\n"
+"if (@_ < 3) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to CMode\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $chan = shift;\n"
+"my $modes = shift;\n"
+"my $args = shift;\n"
+"return NeoStats::Internal::CMode($bot, $chan, $modes, $args);\n"
+"}\n"
+"\n"
+"sub ChanUserMode {\n"
+"if (@_ < 4) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to ChanUserMode\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $chan = shift;\n"
+"my $modes = shift;\n"
+"my $target = shift;\n"
+"return NeoStats::Internal::ChanUserMode($bot, $chan, $modes, $target);\n"
+"}\n"
+"\n"
+"sub Kill {\n"
+"if (@_ < 3) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to Kill\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $target = shift;\n"
+"my $reason = shift;\n"
+"return NeoStats::Internal::Kill($bot, $target, $reason);\n"
+"}\n"
+"\n"
+"sub Kick {\n"
+"if (@_ < 3) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to Kick\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $chan = shift;\n"
+"my $target = shift;\n"
+"my $reason = shift;\n"
+"return NeoStats::Internal::Kick($bot, $chan, $target, $reason);\n"
+"}\n"
+"\n"
+"sub Invite {\n"
+"if (@_ < 3) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to Invite\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $chan = shift;\n"
+"my $target = shift;\n"
+"return NeoStats::Internal::Invite($bot, $chan, $target);\n"
+"}\n"
+"\n"
+"sub Topic {\n"
+"if (@_ < 3) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to Topic\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $chan = shift;\n"
+"my $topic = shift;\n"
+"return NeoStats::Internal::Topic($bot, $chan, $topic);\n"
+"}\n"
+"\n"
+"sub SvsKill {\n"
+"if (@_ < 3) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to SvsKill\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $target = shift;\n"
+"my $reason = shift;\n"
+"return NeoStats::Internal::SvsKill($bot, $target, $reason);\n"
+"}\n"
+"\n"
+"sub SvsMode {\n"
+"if (@_ < 3) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to SvsMode\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $target = shift;\n"
+"my $mode = shift;\n"
+"return NeoStats::Internal::SvsKill($bot, $target, $mode);\n"
+"}\n"
+"\n"
+"sub SvsHost {\n"
+"if (@_ < 3) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to SvsHost\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $target = shift;\n"
+"my $host = shift;\n"
+"return NeoStats::Internal::SvsHost($bot, $target, $host);\n"
+"}\n"
+"\n"
+"sub SvsJoin {\n"
+"if (@_ < 3) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to SvsJoin\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $target = shift;\n"
+"my $chan = shift;\n"
+"return NeoStats::Internal::SvsJoin($bot, $target, $chan);\n"
+"}\n"
+"\n"
+"sub SvsPart {\n"
+"if (@_ < 3) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to SvsPart\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $target = shift;\n"
+"my $chan = shift;\n"
+"return NeoStats::Internal::SvsPart($bot, $target, $chan);\n"
+"}\n"
+"\n"
+"sub Swhois {\n"
+"if (@_ < 2) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to Swhois\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $target = shift;\n"
+"my $swhois = shift;\n"
+"return NeoStats::Internal::Swhois($target, $swhois);\n"
+"}\n"
+"\n"
+"sub SvsNick {\n"
+"if (@_ < 3) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to SvsNick\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $target = shift;\n"
+"my $newnick = shift;\n"
+"return NeoStats::Internal::SvsNick($bot, $target, $newnick);\n"
+"}\n"
+"\n"
+"sub SMO {\n"
+"if (@_ < 3) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to SMO\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $umodetarget = shift;\n"
+"my $message = shift;\n"
+"return NeoStats::Internal::SMO($bot, $umodetarget, $message);\n"
+"}\n"
+"\n"
+"sub Akill {\n"
+"if (@_ < 5) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to SMO\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $host = shift;\n"
+"my $ident = shift;\n"
+"my $length = shift;\n"
+"my $message = shift;\n"
+"return NeoStats::Internal::Akill($bot, $host, $ident, $length, $message);\n"
+"}\n"
+"\n"
+"sub Rakill {\n"
+"if (@_ < 3) {\n"
+"NeoStats::debug(\"Invalid Number of arguments to SMO\");\n"
+"return NeoStats::NS_FAILURE;\n"
+"}\n"
+"my $bot = shift;\n"
+"my $host = shift;\n"
+"my $ident = shift;\n"
+"return NeoStats::Internal::Rakill($bot, $host, $ident);\n"
+"}\n"
+"\n"
"sub debug {\n"
"\n"
"my $text = shift @_;\n"
Modified: trunk/src/perl.c
==============================================================================
--- trunk/src/perl.c (original)
+++ trunk/src/perl.c Tue Aug 2 22:49:37 2005
@@ -212,10 +212,12 @@
ret = execute_perl(mod_ptr, mod_ptr->event_list[evt]->pe->callback, 2, cmdparams->channel->name, cmdparams->source->name, cmdparams->param);
break;
case EVENT_PARTBOT:
- ret = execute_perl(mod_ptr, mod_ptr->event_list[evt]->pe->callback, 3, cmdparams->channel->name, cmdparams->source->name, cmdparams->param);
+ /* XXX And here */
+ ret = execute_perl(mod_ptr, mod_ptr->event_list[evt]->pe->callback, 2, cmdparams->channel->name, cmdparams->source->name, cmdparams->param);
break;
case EVENT_EMPTYCHAN:
- ret = execute_perl(mod_ptr, mod_ptr->event_list[evt]->pe->callback, 4, cmdparams->channel->name, cmdparams->source->name, cmdparams->bot->name, cmdparams->param);
+ /* XXX And Here as well */
+// ret = execute_perl(mod_ptr, mod_ptr->event_list[evt]->pe->callback, 3, cmdparams->channel->name, cmdparams->source->name, cmdparams->bot->name, cmdparams->param);
break;
case EVENT_KICK:
ret = execute_perl(mod_ptr, mod_ptr->event_list[evt]->pe->callback, 4, cmdparams->channel->name, cmdparams->source->name, cmdparams->target->name, cmdparams->param);
@@ -674,7 +676,6 @@
bot_cmd *bc;
Bot *bot;
int i, j;
- char *temp[] = { "Test Command", "Test Command Two", NULL};
dXSARGS;
mod = GET_CUR_MODULE();
@@ -773,8 +774,7 @@
bot = FindBot(SvPV_nolen(ST(0)));
u = FindUser(SvPV_nolen(ST(1)));
if (bot && u) {
- irc_prefmsg(bot, u, "%s", SvPV_nolen(ST(2)));
- return XSRETURN_UV(NS_SUCCESS);
+ XSRETURN_UV(irc_prefmsg(bot, u, "%s", SvPV_nolen(ST(2))));
}
}
@@ -794,116 +794,552 @@
} else {
bot = FindBot(SvPV_nolen(ST(0)));
if (bot) {
- irc_chanalert(bot, "%s", SvPV_nolen(ST(1)));
- return XSRETURN_UV(NS_SUCCESS);
+ XSRETURN_UV(irc_chanalert(bot, "%s", SvPV_nolen(ST(1))));
}
}
XSRETURN_UV(NS_FAILURE);
}
+static
+XS (XS_NeoStats_PrivMsg)
+{
+ Module *mod;
+ Bot *bot;
+ Client *u;
-#if 0
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 3) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:PrivMsg(from, to, message)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ u = FindUser(SvPV_nolen(ST(1)));
+ if (bot && u) {
+ XSRETURN_UV(irc_privmsg(bot, u, "%s", SvPV_nolen(ST(2))));
+ }
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
static
-XS (XS_Xchat_get_list)
+XS (XS_NeoStats_Notice)
{
- SV *name;
- HV *hash;
- xchat_list *list;
- const char *const *fields;
- const char *field;
- int i = 0; /* field index */
- int count = 0; /* return value for scalar context */
- U32 context;
+ Module *mod;
+ Bot *bot;
+ Client *u;
+
dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 3) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:Notice(from, to, message)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ u = FindUser(SvPV_nolen(ST(1)));
+ if (bot && u) {
+ XSRETURN_UV(irc_notice(bot, u, "%s", SvPV_nolen(ST(2))));
+ }
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
- if (items != 1) {
- xchat_print (ph, "Usage: NeoStats::get_list(name)");
+static
+XS (XS_NeoStats_ChanPrivMsg)
+{
+ Module *mod;
+ Bot *bot;
+
+
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 3) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:ChanPrivMsg(from, to, message)");
} else {
- SP -= items; /*remove the argument list from the stack */
+ bot = FindBot(SvPV_nolen(ST(0)));
+ if (bot && FindChannel(SvPV_nolen(ST(1)))) {
+ XSRETURN_UV(irc_chanprivmsg(bot, SvPV_nolen(ST(1)), "%s", SvPV_nolen(ST(2))));
+ }
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
- name = ST (0);
+static
+XS (XS_NeoStats_ChanNotice)
+{
+ Module *mod;
+ Bot *bot;
- list = xchat_list_get (ph, SvPV_nolen (name));
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 3) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:ChanNotice(from, to, message)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ if (bot && FindChannel(SvPV_nolen(ST(1)))) {
+ XSRETURN_UV(irc_channotice(bot, SvPV_nolen(ST(1)), "%s", SvPV_nolen(ST(2))));
+ }
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
- if (list == NULL) {
- XSRETURN_EMPTY;
+static
+XS (XS_NeoStats_Globops)
+{
+ Module *mod;
+ Bot *bot;
+
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 2) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:Globops(from, message)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ if (bot) {
+ XSRETURN_UV(irc_globops(bot, "%s", SvPV_nolen(ST(1))));
}
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
- context = GIMME_V;
+static
+XS (XS_NeoStats_Wallops)
+{
+ Module *mod;
+ Bot *bot;
- if (context == G_SCALAR) {
- while (xchat_list_next (ph, list)) {
- count++;
- }
- xchat_list_free (ph, list);
- XSRETURN_IV ((IV) count);
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 2) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:Wallops(from, message)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ if (bot) {
+ XSRETURN_UV(irc_wallops(bot, "%s", SvPV_nolen(ST(1))));
}
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
- fields = xchat_list_fields (ph, SvPV_nolen (name));
- while (xchat_list_next (ph, list)) {
- i = 0;
- hash = newHV ();
- sv_2mortal ((SV *) hash);
- while (fields[i] != NULL) {
- switch (fields[i][0]) {
- case 's':
- field = xchat_list_str (ph, list, fields[i] + 1);
- if (field != NULL) {
- hv_store (hash, fields[i] + 1, strlen (fields[i] + 1),
- newSVpvn (field, strlen (field)), 0);
- /* xchat_printf (ph, */
- /* "string: %s - %d - %s", */
- /* fields[i]+1, */
- /* strlen(fields[i]+1), */
- /* field, strlen(field) */
- /* ); */
- } else {
- hv_store (hash, fields[i] + 1, strlen (fields[i] + 1),
- &PL_sv_undef, 0);
- /* xchat_printf (ph, */
- /* "string: %s - %d - undef", */
- /* fields[i]+1, */
- /* strlen(fields[i]+1) */
- /* ); */
- }
- break;
- case 'p':
- /* xchat_printf (ph, "pointer: %s", fields[i]+1); */
- hv_store (hash, fields[i] + 1, strlen (fields[i] + 1),
- newSVuv (PTR2UV (xchat_list_str (ph, list,
- fields[i] + 1)
- )), 0);
- break;
- case 'i':
- hv_store (hash, fields[i] + 1, strlen (fields[i] + 1),
- newSVuv (xchat_list_int (ph, list, fields[i] + 1)),
- 0);
- /* xchat_printf (ph, "int: %s - %d",fields[i]+1, */
- /* xchat_list_int (ph, list, fields[i]+1) */
- /* ); */
- break;
- case 't':
- hv_store (hash, fields[i] + 1, strlen (fields[i] + 1),
- newSVnv (xchat_list_time (ph, list, fields[i] + 1)),
- 0);
- break;
- }
- i++;
- }
+static
+XS (XS_NeoStats_Numeric)
+{
+ Module *mod;
- XPUSHs (newRV_noinc ((SV *) hash));
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 3) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:Numeric(numeric, to, message)");
+ } else {
+ XSRETURN_UV(irc_numeric(SvIV(ST(0)), SvPV_nolen(ST(1)), "%s", SvPV_nolen(ST(2))));
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
+static
+XS (XS_NeoStats_Umode)
+{
+ Module *mod;
+ Bot *bot;
+
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 3) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:Umode(bot, target, umode)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ if (bot) {
+ XSRETURN_UV(irc_umode(bot, SvPV_nolen(ST(1)), SvIV(ST(2))));
}
- xchat_list_free (ph, list);
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
- PUTBACK;
- return;
+static
+XS (XS_NeoStats_Join)
+{
+ Module *mod;
+ Bot *bot;
+
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 3) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:Join(bot, channel, cmode)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ if (bot) {
+ XSRETURN_UV(irc_join(bot, SvPV_nolen(ST(1)), SvPV_nolen(ST(2))));
+ }
+
}
+ XSRETURN_UV(NS_FAILURE);
+}
+
+static
+XS (XS_NeoStats_Part)
+{
+ Module *mod;
+ Bot *bot;
+
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 2) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:Part(bot, channel, <message>)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ if (bot) {
+ XSRETURN_UV(irc_part(bot, SvPV_nolen(ST(1)), items == 3 ? SvPV_nolen(ST(2)) : ""));
+ }
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
+
+static
+XS (XS_NeoStats_NickChange)
+{
+ Module *mod;
+ Bot *bot;
+
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 2) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:NickChange(bot, newnick)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ if (bot) {
+ XSRETURN_UV(irc_nickchange(bot, SvPV_nolen(ST(1))));
+ }
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
+
+static
+XS (XS_NeoStats_CMode)
+{
+ Module *mod;
+ Bot *bot;
+
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 3) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:CMode(bot, chan, mode, <args>)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ if (bot && FindChannel(SvPV_nolen(ST(1)))) {
+ XSRETURN_UV(irc_cmode(bot, SvPV_nolen(ST(1)), SvPV_nolen(ST(2)), items == 4 ? SvPV_nolen(ST(3)) : ""));
+ }
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
+
+static
+XS (XS_NeoStats_ChanUserMode)
+{
+ Module *mod;
+ Bot *bot;
+
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 4) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:ChanUserMode(bot, chan, mode, target)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ if (bot && FindChannel(SvPV_nolen(ST(1)))) {
+ XSRETURN_UV(irc_cmode(bot, SvPV_nolen(ST(1)), SvPV_nolen(ST(2)), SvPV_nolen(ST(3))));
+ }
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
+
+static
+XS (XS_NeoStats_Kill)
+{
+ Module *mod;
+ Bot *bot;
+
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 3) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:Kill(bot, target, reason)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ if (bot) {
+ XSRETURN_UV(irc_kill(bot, SvPV_nolen(ST(1)), SvPV_nolen(ST(2))));
+ }
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
+
+static
+XS (XS_NeoStats_Kick)
+{
+ Module *mod;
+ Bot *bot;
+
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 3) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:Kill(bot, chan, target, <reason>)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ if (bot && FindChannel(SvPV_nolen(ST(1)))) {
+ XSRETURN_UV(irc_kick(bot, SvPV_nolen(ST(1)), SvPV_nolen(ST(2)), items == 4 ? SvPV_nolen(ST(3)) : "" ));
+ }
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
+
+static
+XS (XS_NeoStats_Invite)
+{
+ Module *mod;
+ Bot *bot;
+ Client *u;
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 3) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:Invite(bot, target, chan)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ u = FindUser(SvPV_nolen(ST(1)));
+ if (bot && u && FindChannel(SvPV_nolen(ST(2)))) {
+ XSRETURN_UV(irc_invite(bot, u, SvPV_nolen(ST(2))));
+ }
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
+
+static
+XS (XS_NeoStats_Topic)
+{
+ Module *mod;
+ Bot *bot;
+ Channel *c;
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 3) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:Topic(bot, chan, topic)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ c = FindChannel(SvPV_nolen(ST(1)));
+ if (bot && c) {
+ XSRETURN_UV(irc_topic(bot, c, SvPV_nolen(ST(2))));
+ }
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
+
+static
+XS (XS_NeoStats_SvsKill)
+{
+ Module *mod;
+ Bot *bot;
+ Client *u;
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 3) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:SvsKill(bot, target, reason)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ u = FindUser(SvPV_nolen(ST(1)));
+ if (bot && u) {
+ XSRETURN_UV(irc_svskill(bot, u, SvPV_nolen(ST(2))));
+ }
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
+
+static
+XS (XS_NeoStats_SvsMode)
+{
+ Module *mod;
+ Bot *bot;
+ Client *u;
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 3) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:SvsMode(bot, target, mode)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ u = FindUser(SvPV_nolen(ST(1)));
+ if (bot && u) {
+ XSRETURN_UV(irc_svsmode(bot, u, SvPV_nolen(ST(2))));
+ }
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
+
+static
+XS (XS_NeoStats_SvsHost)
+{
+ Module *mod;
+ Bot *bot;
+ Client *u;
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 3) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:SvsHost(bot, target, host)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ u = FindUser(SvPV_nolen(ST(1)));
+ if (bot && u) {
+ XSRETURN_UV(irc_svshost(bot, u, SvPV_nolen(ST(2))));
+ }
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
+
+static
+XS (XS_NeoStats_SvsJoin)
+{
+ Module *mod;
+ Bot *bot;
+ Client *u;
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 3) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:SvsJoin(bot, target, chan)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ u = FindUser(SvPV_nolen(ST(1)));
+ if (bot && u) {
+ XSRETURN_UV(irc_svsjoin(bot, u, SvPV_nolen(ST(2))));
+ }
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
+
+static
+XS (XS_NeoStats_SvsPart)
+{
+ Module *mod;
+ Bot *bot;
+ Client *u;
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 3) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:SvsPart(bot, target, chan)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ u = FindUser(SvPV_nolen(ST(1)));
+ if (bot && u) {
+ XSRETURN_UV(irc_svspart(bot, u, SvPV_nolen(ST(2))));
+ }
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
+
+static
+XS (XS_NeoStats_Swhois)
+{
+ Module *mod;
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 2) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:Swhois(target, swhois)");
+ } else {
+ XSRETURN_UV(irc_swhois(SvPV_nolen(ST(0)), SvPV_nolen(ST(1))));
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
+
+static
+XS (XS_NeoStats_SvsNick)
+{
+ Module *mod;
+ Bot *bot;
+ Client *u;
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 3) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:SvsNick(bot, target, newnick)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ u = FindUser(SvPV_nolen(ST(1)));
+ if (bot && u) {
+ XSRETURN_UV(irc_svsnick(bot, u, SvPV_nolen(ST(2))));
+ }
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
+
+static
+XS (XS_NeoStats_SMO)
+{
+ Module *mod;
+ Bot *bot;
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 3) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:SMO(bot, umodetarget, message)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ if (bot) {
+ XSRETURN_UV(irc_smo(bot, SvPV_nolen(ST(1)), SvPV_nolen(ST(2))));
+ }
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
+
+static
+XS (XS_NeoStats_Akill)
+{
+ Module *mod;
+ Bot *bot;
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 5) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:Akill(bot, host, ident, length, reason)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ if (bot) {
+ XSRETURN_UV(irc_akill(bot, SvPV_nolen(ST(1)), SvPV_nolen(ST(2)), SvIV(ST(3)), SvPV_nolen(ST(4))));
+ }
+
+ }
+ XSRETURN_UV(NS_FAILURE);
+}
+
+static
+XS (XS_NeoStats_Rakill)
+{
+ Module *mod;
+ Bot *bot;
+ dXSARGS;
+ mod = GET_CUR_MODULE();
+ if (items < 3) {
+ nlog(LOG_WARNING, "Usage: NeoStats:Internal:Rakill(bot, host, ident)");
+ } else {
+ bot = FindBot(SvPV_nolen(ST(0)));
+ if (bot) {
+ XSRETURN_UV(irc_rakill(bot, SvPV_nolen(ST(1)), SvPV_nolen(ST(2))));
+ }
+
+ }
+ XSRETURN_UV(NS_FAILURE);
}
-#endif
/* xs_init is the second argument perl_parse. As the name hints, it
initializes XS subroutines (see the perlembed manpage) */
@@ -928,6 +1364,33 @@
newXS ("NeoStats::Internal::DelCommand", XS_NeoStats_DelCommand, __FILE__);
newXS ("NeoStats::Internal::Prefmsg", XS_NeoStats_Prefmsg, __FILE__);
newXS ("NeoStats::Internal::ChanAlert", XS_NeoStats_ChanAlert, __FILE__);
+ newXS ("NeoStats::Internal::PrivMsg", XS_NeoStats_PrivMsg, __FILE__);
+ newXS ("NeoStats::Internal::Notice", XS_NeoStats_Notice, __FILE__);
+ newXS ("NeoStats::Internal::ChanPrivMsg", XS_NeoStats_ChanPrivMsg, __FILE__);
+ newXS ("NeoStats::Internal::ChanNotice", XS_NeoStats_ChanNotice, __FILE__);
+ newXS ("NeoStats::Internal::Globops", XS_NeoStats_Globops, __FILE__);
+ newXS ("NeoStats::Internal::Wallops", XS_NeoStats_Wallops, __FILE__);
+ newXS ("NeoStats::Internal::Numeric", XS_NeoStats_Numeric, __FILE__);
+ newXS ("NeoStats::Internal::Umode", XS_NeoStats_Umode, __FILE__);
+ newXS ("NeoStats::Internal::Join", XS_NeoStats_Join, __FILE__);
+ newXS ("NeoStats::Internal::Part", XS_NeoStats_Part, __FILE__);
+ newXS ("NeoStats::Internal::NickChange", XS_NeoStats_NickChange, __FILE__);
+ newXS ("NeoStats::Internal::CMode", XS_NeoStats_CMode, __FILE__);
+ newXS ("NeoStats::Internal::ChanUserMode", XS_NeoStats_ChanUserMode, __FILE__);
+ newXS ("NeoStats::Internal::Kill", XS_NeoStats_Kill, __FILE__);
+ newXS ("NeoStats::Internal::Kick", XS_NeoStats_Kick, __FILE__);
+ newXS ("NeoStats::Internal::Invite", XS_NeoStats_Invite, __FILE__);
+ newXS ("NeoStats::Internal::Topic", XS_NeoStats_Topic, __FILE__);
+ newXS ("NeoStats::Internal::SvsKill", XS_NeoStats_SvsKill, __FILE__);
+ newXS ("NeoStats::Internal::SvsMode", XS_NeoStats_SvsMode, __FILE__);
+ newXS ("NeoStats::Internal::SvsHost", XS_NeoStats_SvsHost, __FILE__);
+ newXS ("NeoStats::Internal::SvsJoin", XS_NeoStats_SvsJoin, __FILE__);
+ newXS ("NeoStats::Internal::SvsPart", XS_NeoStats_SvsPart, __FILE__);
+ newXS ("NeoStats::Internal::Swhois", XS_NeoStats_Swhois, __FILE__);
+ newXS ("NeoStats::Internal::SvsNick", XS_NeoStats_SvsNick, __FILE__);
+ newXS ("NeoStats::Internal::SMO", XS_NeoStats_SMO, __FILE__);
+ newXS ("NeoStats::Internal::Akill", XS_NeoStats_Akill, __FILE__);
+ newXS ("NeoStats::Internal::Rakill", XS_NeoStats_Rakill, __FILE__);
stash = get_hv ("NeoStats::", TRUE);
if (stash == NULL) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.