[nexuiz-commits] r8651 - trunk/server/rcon2irc
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Feb 16 13:09:20 EST 2010
Author: merlijn
Date: 2010-02-16 13:09:19 -0500 (Tue, 16 Feb 2010)
New Revision: 8651
Removed:
trunk/server/rcon2irc/qnetauth.pl
Log:
This plugin is now integrated in rcon2irc.pl
Deleted: trunk/server/rcon2irc/qnetauth.pl
===================================================================
--- trunk/server/rcon2irc/qnetauth.pl 2010-02-16 17:58:18 UTC (rev 8650)
+++ trunk/server/rcon2irc/qnetauth.pl 2010-02-16 18:09:19 UTC (rev 8651)
@@ -1,62 +0,0 @@
-# Nexuiz rcon2irc plugin by Merlijn Hofstra licensed under GPL - qnetauth.pl
-# Place this file inside the same directory as rcon2irc.pl and add the full filename to the plugins.
-
-# This plugin will automatically authenticate users who have a login for Quakenet (on the Q bot).
-# If you login to the Q bot, this plugin will pick this up and users in the list below can automatically
-# execute commands on the rcon2irc bot.
-{ my @users = qw{merlijn};
-
-$store{plugin_qnetauth}->{users} = \@users; }
-
-sub out($$@);
-sub schedule($$);
-
-if (defined %config) {
- schedule sub {
- my ($timer) = @_;
- out irc => 0, "PRIVMSG Q :users " . $config{irc_channel};
- schedule $timer => 300;;
- } => 1;
-}
-
-# Catch joins of people in a channel the bot is in and catch our own joins of a channel
-[ irc => q{:(([^! ]*)![^ ]*) JOIN (#.+)} => sub {
- my ($hostmask, $nick, $chan) = @_;
- my $qa = $store{plugin_qnetauth};
-
- if ($nick eq $config{irc_nick}) {
- out irc => 0, "PRIVMSG Q :users $chan"; # get auths for all users
- } else {
- $qa->{hosts}->{$nick} = $hostmask;
- out irc => 0, "PRIVMSG Q :whois $nick"; # get auth for single user
- }
-
- return 0;
-} ],
-
-# Catch response of users request
-[ irc => q{:Q!TheQBot at CServe.quakenet.org NOTICE [^:]+ :[@\+\s]?(\S+)\s+(\S+)\s*(\S*)\s*\((.*)\)} => sub {
- my ($nick, $username, $flags, $host) = @_;
- my $qa = $store{plugin_qnetauth};
-
- foreach my $user (@{ $qa->{users} }) {
- $store{logins}{"$nick!$host"} = time() + 600 if ($user eq $username);
- }
-
- return 0;
-} ],
-
-# Catch response of whois request
-[ irc => q{:Q!TheQBot at CServe.quakenet.org NOTICE [^:]+ :-Information for user (.*) \(using account (.*)\):} => sub {
- my ($nick, $username) = @_;
- my $qa = $store{plugin_qnetauth};
-
- foreach my $user (@{ $qa->{users} }) {
- if ($user eq $username) {
- my $hostmask = $qa->{hosts}->{$nick};
- $store{logins}{$hostmask} = time() + 600;
- }
- }
-
- return 0;
-} ],
More information about the nexuiz-commits
mailing list