├── .gitignore ├── README.md ├── XG.Application ├── Program.cs ├── Properties │ └── AssemblyInfo.cs ├── XG.Application.csproj ├── app.config ├── packages.config └── start.sh ├── XG.Build.Mono └── XG.Build.Mono.mdproj ├── XG.Build.Wix ├── Product.wxs ├── RenameMsi.bat ├── XG.Build.Wix.wixproj └── getmsiversion.vbs ├── XG.Business ├── App.cs ├── Helper │ ├── FileActions.cs │ ├── FileSystem.cs │ ├── Objects.cs │ ├── Process.cs │ ├── Rrd.cs │ └── Snapshots.cs ├── Job │ ├── BotWatchdog.cs │ └── Rrd.cs ├── Model │ └── Snapshot.cs ├── Plugins.cs ├── Properties │ └── AssemblyInfo.cs ├── XG.Business.csproj └── packages.config ├── XG.Config ├── Properties │ ├── AssemblyInfo.cs │ ├── Extensions.cs │ ├── FileHandler.cs │ ├── FileHandlerProcess.cs │ ├── Settings.Designer.cs │ └── Settings.settings ├── XG.Config.csproj ├── XgSettingsProvider.cs ├── app.config └── packages.config ├── XG.DB ├── App.config ├── Dao.cs ├── Properties │ └── AssemblyInfo.cs ├── SqliteConverter.cs ├── XG.DB.csproj └── packages.config ├── XG.Extensions ├── EventArgs.cs ├── Extensions.cs ├── Properties │ └── AssemblyInfo.cs └── XG.Extensions.csproj ├── XG.Model ├── Domain │ ├── AObject.cs │ ├── AObjects.cs │ ├── ApiKey.cs │ ├── ApiKeys.cs │ ├── Bot.cs │ ├── Channel.cs │ ├── File.cs │ ├── Files.cs │ ├── Helper.cs │ ├── Notification.cs │ ├── Notifications.cs │ ├── Packet.cs │ ├── Search.cs │ ├── Searches.cs │ ├── Server.cs │ └── Servers.cs ├── Properties │ └── AssemblyInfo.cs ├── XG.Model.csproj └── packages.config ├── XG.Plugin.ElasticSearch ├── Object │ ├── AObject.cs │ ├── Bot.cs │ ├── Channel.cs │ ├── Packet.cs │ └── Server.cs ├── Plugin.cs ├── Properties │ └── AssemblyInfo.cs ├── XG.Plugin.ElasticSearch.csproj ├── app.config ├── install.txt └── packages.config ├── XG.Plugin.Import ├── Plugin.cs ├── Properties │ └── AssemblyInfo.cs ├── XG.Plugin.Import.csproj └── packages.config ├── XG.Plugin.Irc ├── BotDownload.cs ├── Connection.cs ├── Download.cs ├── IrcConnection.cs ├── IrcEvent.cs ├── Job │ ├── ConnectionWatcher.cs │ ├── ServerConnect.cs │ └── TimerTrigger.cs ├── Parser │ ├── AParser.cs │ ├── Helper.cs │ ├── Message.cs │ ├── Parser.cs │ └── Types │ │ ├── AParserWithExistingBot.cs │ │ ├── ASaveBotMessageParser.cs │ │ ├── Dcc │ │ ├── DownloadFromBot.cs │ │ ├── Version.cs │ │ └── XdccListSend.cs │ │ ├── Info │ │ ├── Bandwidth.cs │ │ ├── Join.cs │ │ ├── Packet.cs │ │ └── Status.cs │ │ ├── Nickserv.cs │ │ ├── Xdcc │ │ ├── AllSlotsFull.cs │ │ ├── AlreadyReceiving.cs │ │ ├── AutoIgnore.cs │ │ ├── ClosingConnection.cs │ │ ├── DccPending.cs │ │ ├── InvalidPacketNumber.cs │ │ ├── NotInQueue.cs │ │ ├── OwnerRequest.cs │ │ ├── PacketAlreadyQueued.cs │ │ ├── PacketAlreadyRequested.cs │ │ ├── QueueFull.cs │ │ ├── Queued.cs │ │ ├── RemoveFromQueue.cs │ │ ├── TransferLimit.cs │ │ ├── XdccDenied.cs │ │ ├── XdccDown.cs │ │ └── XdccSending.cs │ │ └── XdccList.cs ├── Plugin.cs ├── Properties │ └── AssemblyInfo.cs ├── ThrottledStream.cs ├── TimedList.cs ├── XG.Plugin.Irc.csproj ├── XdccClient.cs ├── XdccListEntry.cs └── packages.config ├── XG.Plugin.Jabber ├── Plugin.cs ├── Properties │ └── AssemblyInfo.cs ├── XG.Plugin.Jabber.csproj └── packages.config ├── XG.Plugin.Webserver ├── ASaltedPassword.cs ├── Content │ ├── bootstrap.min.css │ ├── ng-table.min.css │ └── normalize.css ├── DoubleConverter.cs ├── Job │ ├── RemoteSettingsLoader.cs │ └── SearchUpdater.cs ├── Nancy │ ├── Api │ │ ├── ApiModule.cs │ │ ├── Bots.cs │ │ ├── Channels.cs │ │ ├── Files.cs │ │ ├── Model │ │ │ └── Domain │ │ │ │ ├── AObject.cs │ │ │ │ ├── Bot.cs │ │ │ │ ├── Channel.cs │ │ │ │ ├── File.cs │ │ │ │ ├── Packet.cs │ │ │ │ ├── Search.cs │ │ │ │ └── Server.cs │ │ ├── Packets.cs │ │ ├── Request │ │ │ ├── ARequest.cs │ │ │ ├── ChannelAdd.cs │ │ │ ├── PacketDownload.cs │ │ │ ├── PacketSearch.cs │ │ │ ├── SearchAdd.cs │ │ │ └── ServerAdd.cs │ │ ├── Result │ │ │ ├── Default.cs │ │ │ └── Objects.cs │ │ ├── Searches.cs │ │ └── Servers.cs │ ├── Authentication │ │ ├── ApiKeyAuthentication.cs │ │ ├── ApiKeyHttpExtensions.cs │ │ └── ApiKeyUserIdentity.cs │ ├── CustomBootstrapper.cs │ ├── Helper.cs │ ├── LoginModule.cs │ ├── RedirectModule.cs │ └── ShutdownModule.cs ├── Object │ └── Flot.cs ├── Plugin.cs ├── Properties │ └── AssemblyInfo.cs ├── RemoteSettings.cs ├── Resources │ ├── css │ │ ├── animate.css │ │ ├── animation.css │ │ ├── init.css │ │ ├── tango-colors.css │ │ └── xg.css │ ├── favicon.ico │ ├── images │ │ └── chat.ico │ ├── index.html │ ├── js │ │ ├── app.js │ │ ├── bootstrap.js │ │ ├── config │ │ │ ├── config-offline.js │ │ │ ├── enum.js │ │ │ ├── index.js │ │ │ └── module.js │ │ ├── controller │ │ │ ├── dashboard.js │ │ │ ├── dialog │ │ │ │ ├── api.js │ │ │ │ ├── config.js │ │ │ │ ├── error.js │ │ │ │ ├── index.js │ │ │ │ ├── module.js │ │ │ │ ├── offline.js │ │ │ │ ├── password.js │ │ │ │ ├── serverChannel.js │ │ │ │ ├── shutdown.js │ │ │ │ └── xdcc.js │ │ │ ├── external.js │ │ │ ├── file.js │ │ │ ├── index.js │ │ │ ├── main.js │ │ │ ├── module.js │ │ │ ├── notification.js │ │ │ ├── packet.js │ │ │ ├── search.js │ │ │ └── snapshot.js │ │ ├── directive │ │ │ ├── flot.js │ │ │ ├── focus.js │ │ │ ├── index.js │ │ │ ├── knob.js │ │ │ └── module.js │ │ ├── factory │ │ │ ├── index.js │ │ │ ├── module.js │ │ │ ├── signalr-table.js │ │ │ └── signalr.js │ │ ├── filter │ │ │ ├── formatter │ │ │ │ ├── base.js │ │ │ │ ├── bot.js │ │ │ │ ├── channel.js │ │ │ │ ├── client.js │ │ │ │ ├── file.js │ │ │ │ ├── index.js │ │ │ │ ├── main.js │ │ │ │ ├── module.js │ │ │ │ ├── notification.js │ │ │ │ ├── packet.js │ │ │ │ ├── search.js │ │ │ │ └── server.js │ │ │ ├── helper.js │ │ │ ├── index.js │ │ │ └── module.js │ │ ├── i18n │ │ │ ├── de.js │ │ │ ├── en.js │ │ │ ├── index.js │ │ │ └── module.js │ │ ├── index.js │ │ ├── init.js │ │ ├── libs │ │ │ ├── angular-translate.min.js │ │ │ ├── domReady.js │ │ │ ├── jquery.flot.axislabels.js │ │ │ ├── jquery.knob.js │ │ │ └── sha256.js │ │ ├── service │ │ │ ├── helper.js │ │ │ ├── index.js │ │ │ ├── module.js │ │ │ └── signalr.js │ │ └── signalr-offline.js │ ├── templates │ │ └── dialog │ │ │ ├── api.html │ │ │ ├── config.html │ │ │ ├── error.html │ │ │ ├── offline.html │ │ │ ├── password.html │ │ │ ├── serverChannel.html │ │ │ ├── shutdown.html │ │ │ └── xdcc.html │ └── xg.appcache ├── Scripts │ ├── angular-animate.min.js │ ├── angular-animate.min.js.map │ ├── angular-cookie.min.js │ ├── angular-sanitize.min.js │ ├── angular-sanitize.min.js.map │ ├── angular-ui │ │ └── ui-bootstrap-tpls.min.js │ ├── angular.min.js │ ├── angular.min.js.map │ ├── bootstrap.min.js │ ├── favico.min.js │ ├── flot │ │ ├── jquery.flot.min.js │ │ ├── jquery.flot.pie.min.js │ │ └── jquery.flot.time.min.js │ ├── jquery-2.1.1.min.js │ ├── jquery.signalR-2.1.2.min.js │ ├── moment-with-locales.min.js │ ├── ng-table.min.js │ └── require.js ├── Search │ ├── Packets.cs │ ├── Result.cs │ ├── Results.cs │ └── WildcardQuery.cs ├── SignalR │ ├── EventForwarder.cs │ └── Hub │ │ ├── AObjectHub.cs │ │ ├── ApiHub.cs │ │ ├── ChannelHub.cs │ │ ├── ConfigHub.cs │ │ ├── ExternalHub.cs │ │ ├── FileHub.cs │ │ ├── Helper.cs │ │ ├── HubAuthorizeAttribute.cs │ │ ├── Model │ │ ├── Client.cs │ │ └── Domain │ │ │ ├── AObject.cs │ │ │ ├── ApiKey.cs │ │ │ ├── Bot.cs │ │ │ ├── Channel.cs │ │ │ ├── Config.cs │ │ │ ├── Extension.cs │ │ │ ├── ExternalSearch.cs │ │ │ ├── ExternalSearchEntry.cs │ │ │ ├── File.cs │ │ │ ├── Flot.cs │ │ │ ├── Notification.cs │ │ │ ├── Packet.cs │ │ │ ├── Result.cs │ │ │ ├── Search.cs │ │ │ └── Server.cs │ │ ├── NotificationHub.cs │ │ ├── PacketHub.cs │ │ ├── SearchHub.cs │ │ ├── ServerHub.cs │ │ └── SnapshotHub.cs ├── StartUp.cs ├── XG.Plugin.Webserver.csproj ├── app.config ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff └── packages.config ├── XG.Plugin ├── ANotificationSender.cs ├── APlugin.cs ├── AWorker.cs ├── JobItem.cs ├── Properties │ └── AssemblyInfo.cs ├── XG.Plugin.csproj └── packages.config ├── XG.Test ├── Business │ └── Helper │ │ ├── FileActions.cs │ │ ├── Filesystem.cs │ │ ├── Objects.cs │ │ └── Process.cs ├── Config │ └── Properties │ │ └── Settings.cs ├── DB │ └── Dao.cs ├── Model │ ├── Domain │ │ ├── Helper.cs │ │ ├── Server.cs │ │ └── Servers.cs │ └── Extensions.cs ├── Plugin │ ├── ElasticSearch │ │ └── Object │ │ │ └── Packet.cs │ ├── Irc │ │ └── Parser │ │ │ ├── AParser.cs │ │ │ └── Types │ │ │ ├── Dcc │ │ │ ├── DownloadFromBot.cs │ │ │ └── Version.cs │ │ │ ├── Info │ │ │ ├── Bandwitdh.cs │ │ │ ├── Join.cs │ │ │ ├── Packet.cs │ │ │ └── Status.cs │ │ │ └── XdccList.cs │ └── Webserver │ │ └── Search │ │ └── Packets.cs ├── Properties │ └── AssemblyInfo.cs ├── XG.Test.csproj ├── app.config └── packages.config ├── XG.sln ├── packages ├── Cache.1.2.1 │ ├── BplusDotNet.dll │ ├── CacheAspect.dll │ ├── CacheAspect.pdb │ ├── Microsoft.ApplicationServer.Caching.Client.dll │ ├── PostSharp.Laos.dll │ └── PostSharp.dll ├── SharpRobin │ └── SharpRobin.dll ├── repositories.config └── smartirc4net.0.5.0 │ ├── Meebey.SmartIrc4net.dll │ └── StarkSoftProxy.dll └── settings.json /XG.Application/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // Allgemeine Informationen über eine Assembly werden über die folgenden 5 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, 6 | // die mit einer Assembly verknüpft sind. 7 | [assembly: AssemblyTitle("XG.Application")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("XG.Application")] 12 | [assembly: AssemblyCopyright("Copyright © 2013")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar 17 | // für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von 18 | // COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. 19 | [assembly: ComVisible(false)] 20 | 21 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird 22 | [assembly: Guid("7008808f-9ed6-46a6-a6e8-b9aaaa16d096")] 23 | 24 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: 25 | // 26 | // Hauptversion 27 | // Nebenversion 28 | // Buildnummer 29 | // Revision 30 | // 31 | // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern 32 | // übernehmen, indem Sie "*" eingeben: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion( "3.3.0.0")] 35 | [assembly: AssemblyFileVersion( "3.3.0.0")] 36 | -------------------------------------------------------------------------------- /XG.Application/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /XG.Application/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /XG.Application/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SOURCE="${BASH_SOURCE[0]}" 4 | DIR="$( dirname "$SOURCE" )" 5 | while [ -h "$SOURCE" ] 6 | do 7 | SOURCE="$(readlink "$SOURCE")" 8 | [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" 9 | DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" 10 | done 11 | DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" 12 | 13 | cd $DIR 14 | mono XG.Application.exe > log.txt & pid=$! 15 | echo $pid > pid 16 | 17 | -------------------------------------------------------------------------------- /XG.Build.Wix/RenameMsi.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | REM capture script output in variable 4 | for /f "usebackq tokens=*" %%a in (`cscript "%~dp0\getmsiversion.vbs" "%~f1"`) do (set myvar=%%a) 5 | 6 | SET MSINAME="%~dp1%~n1_%myvar%%~x1" 7 | echo Renaming to %MSINAME% 8 | move /Y %1 %MSINAME% 9 | 10 | -------------------------------------------------------------------------------- /XG.Build.Wix/getmsiversion.vbs: -------------------------------------------------------------------------------- 1 | 2 | 'Create Installer object. 3 | Dim Installer 4 | Set Installer = CreateObject("WindowsInstaller.Installer") 5 | 'Open the MSI database. You may change the path information as you like. 6 | Dim Database 7 | Set Database = Installer.OpenDatabase(WScript.Arguments(0), 0) 8 | 'Create the SQL statement for query 9 | Dim SQL 10 | SQL = "SELECT * FROM Property WHERE Property = 'ProductVersion'" 11 | 'Open the view and execute the SQL statement 12 | Dim View 13 | Set View = DataBase.OpenView(SQL) 14 | View.Execute 15 | 'Fetch the record for the "ProductVersion" property 16 | Dim Record 17 | Set Record = View.Fetch 18 | 'Show the result. 19 | WScript.echo Record.StringData(2) 20 | -------------------------------------------------------------------------------- /XG.Business/Job/Rrd.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Rrd.cs 3 | // This file is part of XG - XDCC Grabscher 4 | // http://www.larsformella.de/lang/en/portfolio/programme-software/xg 5 | // 6 | // Author: 7 | // Lars Formella 8 | // 9 | // Copyright (c) 2012 Lars Formella 10 | // 11 | // This program is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU General Public License as published by 13 | // the Free Software Foundation; either version 2 of the License, or 14 | // (at your option) any later version. 15 | // 16 | // This program is distributed in the hope that it will be useful, 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU General Public License 22 | // along with this program; if not, write to the Free Software 23 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | // 25 | 26 | using System; 27 | using System.Threading; 28 | using Quartz; 29 | using SharpRobin.Core; 30 | using XG.Business.Helper; 31 | using XG.Business.Model; 32 | 33 | namespace XG.Business.Job 34 | { 35 | public class Rrd : IJob 36 | { 37 | public RrdDb RrdDB { get; set; } 38 | 39 | public void Execute (IJobExecutionContext context) 40 | { 41 | Thread.CurrentThread.Priority = ThreadPriority.Lowest; 42 | 43 | var snapshot = Snapshots.GenerateSnapshot(); 44 | 45 | Sample sample = RrdDB.createSample((Int64)snapshot.Get(SnapshotValue.Timestamp)); 46 | for (int a = 1; a < Snapshot.SnapshotCount; a++) 47 | { 48 | sample.setValue(a + "", snapshot.Get((SnapshotValue)a)); 49 | } 50 | sample.update(); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /XG.Business/Plugins.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Plugins.cs 3 | // This file is part of XG - XDCC Grabscher 4 | // http://www.larsformella.de/lang/en/portfolio/programme-software/xg 5 | // 6 | // Author: 7 | // Lars Formella 8 | // 9 | // Copyright (c) 2012 Lars Formella 10 | // 11 | // This program is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU General Public License as published by 13 | // the Free Software Foundation; either version 2 of the License, or 14 | // (at your option) any later version. 15 | // 16 | // This program is distributed in the hope that it will be useful, 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU General Public License 22 | // along with this program; if not, write to the Free Software 23 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | // 25 | 26 | using System.Collections.Generic; 27 | using XG.Plugin; 28 | 29 | namespace XG.Business 30 | { 31 | public class Plugins 32 | { 33 | #region VARIABLES 34 | 35 | readonly HashSet _plugins; 36 | 37 | #endregion 38 | 39 | #region FUNCTIONS 40 | 41 | public Plugins() 42 | { 43 | _plugins = new HashSet(); 44 | } 45 | 46 | public void Add(APlugin aPlugin) 47 | { 48 | _plugins.Add(aPlugin); 49 | } 50 | 51 | public void StartAll() 52 | { 53 | foreach (APlugin plugin in _plugins) 54 | { 55 | plugin.Start(plugin.GetType().ToString()); 56 | } 57 | } 58 | 59 | public void StopAll() 60 | { 61 | foreach (APlugin plugin in _plugins) 62 | { 63 | plugin.Stop(); 64 | } 65 | } 66 | 67 | #endregion 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /XG.Business/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // Allgemeine Informationen über eine Assembly werden über die folgenden 5 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, 6 | // die mit einer Assembly verknüpft sind. 7 | [assembly: AssemblyTitle("XG.Business")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("XG.Business")] 12 | [assembly: AssemblyCopyright("Copyright © 2013")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar 17 | // für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von 18 | // COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. 19 | [assembly: ComVisible(false)] 20 | 21 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird 22 | [assembly: Guid("cfe7a961-0322-4d8c-9f83-c34466ed2089")] 23 | 24 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: 25 | // 26 | // Hauptversion 27 | // Nebenversion 28 | // Buildnummer 29 | // Revision 30 | // 31 | // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern 32 | // übernehmen, indem Sie "*" eingeben: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion( "3.3.0.0")] 35 | [assembly: AssemblyFileVersion( "3.3.0.0")] 36 | -------------------------------------------------------------------------------- /XG.Business/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /XG.Config/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("XG.Config")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("XG.Config")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("563adc69-9b7f-48b0-b188-7516d26bf2ef")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion( "3.3.0.0")] 36 | [assembly: AssemblyFileVersion( "3.3.0.0")] 37 | -------------------------------------------------------------------------------- /XG.Config/Properties/FileHandler.cs: -------------------------------------------------------------------------------- 1 | // 2 | // FileHandler.cs 3 | // This file is part of XG - XDCC Grabscher 4 | // http://www.larsformella.de/lang/en/portfolio/programme-software/xg 5 | // 6 | // Author: 7 | // Lars Formella 8 | // 9 | // Copyright (c) 2012 Lars Formella 10 | // 11 | // This program is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU General Public License as published by 13 | // the Free Software Foundation; either version 2 of the License, or 14 | // (at your option) any later version. 15 | // 16 | // This program is distributed in the hope that it will be useful, 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU General Public License 22 | // along with this program; if not, write to the Free Software 23 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | // 25 | 26 | using Newtonsoft.Json; 27 | 28 | namespace XG.Config.Properties 29 | { 30 | [JsonObject(MemberSerialization.OptOut)] 31 | public class FileHandler 32 | { 33 | public string Regex { get; set; } 34 | 35 | public FileHandlerProcess Process { get; set; } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /XG.Config/Properties/FileHandlerProcess.cs: -------------------------------------------------------------------------------- 1 | // 2 | // FileHandlerProcess.cs 3 | // This file is part of XG - XDCC Grabscher 4 | // http://www.larsformella.de/lang/en/portfolio/programme-software/xg 5 | // 6 | // Author: 7 | // Lars Formella 8 | // 9 | // Copyright (c) 2012 Lars Formella 10 | // 11 | // This program is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU General Public License as published by 13 | // the Free Software Foundation; either version 2 of the License, or 14 | // (at your option) any later version. 15 | // 16 | // This program is distributed in the hope that it will be useful, 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU General Public License 22 | // along with this program; if not, write to the Free Software 23 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | // 25 | 26 | using Newtonsoft.Json; 27 | 28 | namespace XG.Config.Properties 29 | { 30 | [JsonObject(MemberSerialization.OptOut)] 31 | public class FileHandlerProcess 32 | { 33 | public string Command { get; set; } 34 | 35 | public string Arguments { get; set; } 36 | 37 | public FileHandlerProcess Next { get; set; } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /XG.Config/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /XG.DB/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /XG.DB/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // Allgemeine Informationen über eine Assembly werden über die folgenden 5 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, 6 | // die mit einer Assembly verknüpft sind. 7 | [assembly: AssemblyTitle("XG.DB")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("XG.DB")] 12 | [assembly: AssemblyCopyright("Copyright © 2013")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar 17 | // für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von 18 | // COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. 19 | [assembly: ComVisible(false)] 20 | 21 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird 22 | [assembly: Guid("d9e5978a-8a9f-4f50-9ef2-cee6bf2997c4")] 23 | 24 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: 25 | // 26 | // Hauptversion 27 | // Nebenversion 28 | // Buildnummer 29 | // Revision 30 | // 31 | // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern 32 | // übernehmen, indem Sie "*" eingeben: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion( "3.3.0.0")] 35 | [assembly: AssemblyFileVersion( "3.3.0.0")] 36 | -------------------------------------------------------------------------------- /XG.DB/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /XG.Extensions/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("XG.Extensions")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("XG.Extensions")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("e59ae937-739e-4893-86f0-d0c64c697e15")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion( "3.3.0.0")] 36 | [assembly: AssemblyFileVersion( "3.3.0.0")] 37 | -------------------------------------------------------------------------------- /XG.Model/Domain/ApiKey.cs: -------------------------------------------------------------------------------- 1 | // 2 | // ApiKey.cs 3 | // This file is part of XG - XDCC Grabscher 4 | // http://www.larsformella.de/lang/en/portfolio/programme-software/xg 5 | // 6 | // Author: 7 | // Lars Formella 8 | // 9 | // Copyright (c) 2012 Lars Formella 10 | // 11 | // This program is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU General Public License as published by 13 | // the Free Software Foundation; either version 2 of the License, or 14 | // (at your option) any later version. 15 | // 16 | // This program is distributed in the hope that it will be useful, 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU General Public License 22 | // along with this program; if not, write to the Free Software 23 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | // 25 | 26 | namespace XG.Model.Domain 27 | { 28 | public class ApiKey : AObject 29 | { 30 | int _errorCount; 31 | 32 | public int ErrorCount 33 | { 34 | get { return GetProperty(ref _errorCount); } 35 | set { SetProperty(ref _errorCount, value, "ErrorCount"); } 36 | } 37 | 38 | int _successCount; 39 | 40 | public int SuccessCount 41 | { 42 | get { return GetProperty(ref _successCount); } 43 | set { SetProperty(ref _successCount, value, "SuccessCount"); } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /XG.Model/Domain/ApiKeys.cs: -------------------------------------------------------------------------------- 1 | // 2 | // ApiKeys.cs 3 | // This file is part of XG - XDCC Grabscher 4 | // http://www.larsformella.de/lang/en/portfolio/programme-software/xg 5 | // 6 | // Author: 7 | // Lars Formella 8 | // 9 | // Copyright (c) 2012 Lars Formella 10 | // 11 | // This program is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU General Public License as published by 13 | // the Free Software Foundation; either version 2 of the License, or 14 | // (at your option) any later version. 15 | // 16 | // This program is distributed in the hope that it will be useful, 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU General Public License 22 | // along with this program; if not, write to the Free Software 23 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | // 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | using System.Linq; 29 | 30 | namespace XG.Model.Domain 31 | { 32 | public class ApiKeys : AObjects 33 | { 34 | public IEnumerable All 35 | { 36 | get { return base.Children.Cast(); } 37 | } 38 | 39 | public bool Add(ApiKey aObject) 40 | { 41 | return base.Add(aObject); 42 | } 43 | 44 | public bool Remove(ApiKey aObject) 45 | { 46 | return base.Remove(aObject); 47 | } 48 | 49 | public new ApiKey Named(string aName) 50 | { 51 | AObject tObject = base.Named(aName); 52 | return tObject != null ? (ApiKey) tObject : null; 53 | } 54 | 55 | public new ApiKey WithGuid(Guid aGuid) 56 | { 57 | AObject tObject = base.WithGuid(aGuid); 58 | return tObject != null ? (ApiKey) tObject : null; 59 | } 60 | 61 | protected override bool DuplicateChildExists(AObject aObject) 62 | { 63 | return Named(aObject.Name) != null; 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /XG.Model/Domain/Notifications.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Notifications.cs 3 | // This file is part of XG - XDCC Grabscher 4 | // http://www.larsformella.de/lang/en/portfolio/programme-software/xg 5 | // 6 | // Author: 7 | // Lars Formella 8 | // 9 | // Copyright (c) 2012 Lars Formella 10 | // 11 | // This program is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU General Public License as published by 13 | // the Free Software Foundation; either version 2 of the License, or 14 | // (at your option) any later version. 15 | // 16 | // This program is distributed in the hope that it will be useful, 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU General Public License 22 | // along with this program; if not, write to the Free Software 23 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | // 25 | 26 | using System.Collections.Generic; 27 | using System.Linq; 28 | 29 | namespace XG.Model.Domain 30 | { 31 | public class Notifications : AObjects 32 | { 33 | public IEnumerable All 34 | { 35 | get { return base.Children.Cast(); } 36 | } 37 | 38 | public bool Add(Notification aObject) 39 | { 40 | return base.Add(aObject); 41 | } 42 | 43 | public bool Remove(Notification aObject) 44 | { 45 | return base.Remove(aObject); 46 | } 47 | 48 | protected override bool DuplicateChildExists(AObject aObject) 49 | { 50 | return false; 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /XG.Model/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // Allgemeine Informationen über eine Assembly werden über die folgenden 5 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, 6 | // die mit einer Assembly verknüpft sind. 7 | [assembly: AssemblyTitle("XG.Model")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("XG.Model")] 12 | [assembly: AssemblyCopyright("Copyright © 2013")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar 17 | // für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von 18 | // COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. 19 | [assembly: ComVisible(false)] 20 | 21 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird 22 | [assembly: Guid("f886c3f2-d847-4fff-980f-0839ec1261cc")] 23 | 24 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: 25 | // 26 | // Hauptversion 27 | // Nebenversion 28 | // Buildnummer 29 | // Revision 30 | // 31 | // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern 32 | // übernehmen, indem Sie "*" eingeben: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion( "3.3.0.0")] 35 | [assembly: AssemblyFileVersion( "3.3.0.0")] 36 | -------------------------------------------------------------------------------- /XG.Model/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /XG.Plugin.ElasticSearch/Object/AObject.cs: -------------------------------------------------------------------------------- 1 | // 2 | // AObject.cs 3 | // This file is part of XG - XDCC Grabscher 4 | // http://www.larsformella.de/lang/en/portfolio/programme-software/xg 5 | // 6 | // Author: 7 | // Lars Formella 8 | // 9 | // Copyright (c) 2012 Lars Formella 10 | // 11 | // This program is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU General Public License as published by 13 | // the Free Software Foundation; either version 2 of the License, or 14 | // (at your option) any later version. 15 | // 16 | // This program is distributed in the hope that it will be useful, 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU General Public License 22 | // along with this program; if not, write to the Free Software 23 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | // 25 | 26 | using System; 27 | using Newtonsoft.Json; 28 | 29 | namespace XG.Plugin.ElasticSearch.Object 30 | { 31 | [JsonObject(MemberSerialization.OptOut)] 32 | public class AObject 33 | { 34 | [JsonIgnore] 35 | public virtual Model.Domain.AObject Object { get; set; } 36 | 37 | #region PROPERTIES 38 | 39 | public Guid ParentGuid 40 | { 41 | get { return Object.ParentGuid; } 42 | } 43 | 44 | public Guid Guid 45 | { 46 | get { return Object.Guid; } 47 | } 48 | 49 | public virtual string Name 50 | { 51 | get { return Object.Name.Trim(); } 52 | } 53 | 54 | public bool Connected 55 | { 56 | get { return Object.Connected; } 57 | } 58 | 59 | public bool Enabled 60 | { 61 | get { return Object.Enabled; } 62 | } 63 | 64 | #endregion 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /XG.Plugin.ElasticSearch/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // Allgemeine Informationen über eine Assembly werden über die folgenden 5 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, 6 | // die mit einer Assembly verknüpft sind. 7 | [assembly: AssemblyTitle("XG.Plugin.ElasticSearch")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("XG.Plugin.ElasticSearch")] 12 | [assembly: AssemblyCopyright("Copyright © 2013")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar 17 | // für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von 18 | // COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. 19 | [assembly: ComVisible(false)] 20 | 21 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird 22 | [assembly: Guid("c7f68251-6d2f-495a-9f1f-5f6c59880c6a")] 23 | 24 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: 25 | // 26 | // Hauptversion 27 | // Nebenversion 28 | // Buildnummer 29 | // Revision 30 | // 31 | // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern 32 | // übernehmen, indem Sie "*" eingeben: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion( "3.3.0.0")] 35 | [assembly: AssemblyFileVersion( "3.3.0.0")] 36 | -------------------------------------------------------------------------------- /XG.Plugin.ElasticSearch/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /XG.Plugin.ElasticSearch/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /XG.Plugin.Import/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // Allgemeine Informationen über eine Assembly werden über die folgenden 5 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, 6 | // die mit einer Assembly verknüpft sind. 7 | [assembly: AssemblyTitle("XG.Plugin.Import")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("XG.Plugin.Import")] 12 | [assembly: AssemblyCopyright("Copyright © 2013")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar 17 | // für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von 18 | // COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. 19 | [assembly: ComVisible(false)] 20 | 21 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird 22 | [assembly: Guid("f1ae2fbc-2c8a-4a1e-a20d-c94ec27a8073")] 23 | 24 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: 25 | // 26 | // Hauptversion 27 | // Nebenversion 28 | // Buildnummer 29 | // Revision 30 | // 31 | // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern 32 | // übernehmen, indem Sie "*" eingeben: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion( "3.3.0.0")] 35 | [assembly: AssemblyFileVersion( "3.3.0.0")] 36 | -------------------------------------------------------------------------------- /XG.Plugin.Import/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /XG.Plugin.Irc/IrcEvent.cs: -------------------------------------------------------------------------------- 1 | // 2 | // IrcEvent.cs 3 | // This file is part of XG - XDCC Grabscher 4 | // http://www.larsformella.de/lang/en/portfolio/programme-software/xg 5 | // 6 | // Author: 7 | // Lars Formella 8 | // 9 | // Copyright (c) 2013 Lars Formella 10 | // 11 | // This program is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU General Public License as published by 13 | // the Free Software Foundation; either version 2 of the License, or 14 | // (at your option) any later version. 15 | // 16 | // This program is distributed in the hope that it will be useful, 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU General Public License 22 | // along with this program; if not, write to the Free Software 23 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | // 25 | 26 | using System; 27 | 28 | namespace XG.Plugin.Irc 29 | { 30 | public class IrcEvent 31 | { 32 | #region ENUMS 33 | 34 | public enum EventType : byte 35 | { 36 | Ban, 37 | ChannelMessage, 38 | Connected, 39 | CtcpReply, 40 | CtcpRequest, 41 | ErrorMessage, 42 | Join, 43 | Kick, 44 | Part, 45 | Names, 46 | NickChange, 47 | QueryMessage, 48 | QueryNotice, 49 | Quit, 50 | ReadLine, 51 | Topic, 52 | TopicChange, 53 | UnBan 54 | } 55 | 56 | #endregion 57 | 58 | #region VARIABLES 59 | 60 | public EventArgs Event { get; set; } 61 | 62 | public EventType Type { get; set; } 63 | 64 | #endregion 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /XG.Plugin.Irc/Job/ConnectionWatcher.cs: -------------------------------------------------------------------------------- 1 | // 2 | // ConnectionWatcher.cs 3 | // This file is part of XG - XDCC Grabscher 4 | // http://www.larsformella.de/lang/en/portfolio/programme-software/xg 5 | // 6 | // Author: 7 | // Lars Formella 8 | // 9 | // Copyright (c) 2012 Lars Formella 10 | // 11 | // This program is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU General Public License as published by 13 | // the Free Software Foundation; either version 2 of the License, or 14 | // (at your option) any later version. 15 | // 16 | // This program is distributed in the hope that it will be useful, 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU General Public License 22 | // along with this program; if not, write to the Free Software 23 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | // 25 | 26 | using System; 27 | using log4net; 28 | using System.Reflection; 29 | using Quartz; 30 | 31 | namespace XG.Plugin.Irc.Job 32 | { 33 | public class ConnectionWatcher : IJob 34 | { 35 | static readonly ILog _log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 36 | 37 | public Connection Connection { get; set; } 38 | public Int64 MaximalTimeAfterLastContact { get; set; } 39 | 40 | public void Execute (IJobExecutionContext context) 41 | { 42 | if ((DateTime.Now - Connection.LastContact).TotalSeconds < MaximalTimeAfterLastContact) 43 | { 44 | return; 45 | } 46 | 47 | _log.Error("Execute() connection " + Connection.Name + " seems hanging since more than " + MaximalTimeAfterLastContact + " seconds"); 48 | 49 | Connection.Stopwatch(); 50 | Connection.Stop(); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /XG.Plugin.Irc/Job/ServerConnect.cs: -------------------------------------------------------------------------------- 1 | // 2 | // ServerConnect.cs 3 | // This file is part of XG - XDCC Grabscher 4 | // http://www.larsformella.de/lang/en/portfolio/programme-software/xg 5 | // 6 | // Author: 7 | // Lars Formella 8 | // 9 | // Copyright (c) 2012 Lars Formella 10 | // 11 | // This program is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU General Public License as published by 13 | // the Free Software Foundation; either version 2 of the License, or 14 | // (at your option) any later version. 15 | // 16 | // This program is distributed in the hope that it will be useful, 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU General Public License 22 | // along with this program; if not, write to the Free Software 23 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | // 25 | 26 | using System; 27 | using log4net; 28 | using System.Reflection; 29 | using Quartz; 30 | using XG.Model.Domain; 31 | 32 | namespace XG.Plugin.Irc.Job 33 | { 34 | public class ServerConnect : IJob 35 | { 36 | public Plugin Plugin { get; set; } 37 | public Server Server { get; set; } 38 | 39 | public void Execute (IJobExecutionContext context) 40 | { 41 | Plugin.TryServerConnect(Server); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /XG.Plugin.Irc/Job/TimerTrigger.cs: -------------------------------------------------------------------------------- 1 | // 2 | // TimerTrigger.cs 3 | // This file is part of XG - XDCC Grabscher 4 | // http://www.larsformella.de/lang/en/portfolio/programme-software/xg 5 | // 6 | // Author: 7 | // Lars Formella 8 | // 9 | // Copyright (c) 2012 Lars Formella 10 | // 11 | // This program is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU General Public License as published by 13 | // the Free Software Foundation; either version 2 of the License, or 14 | // (at your option) any later version. 15 | // 16 | // This program is distributed in the hope that it will be useful, 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU General Public License 22 | // along with this program; if not, write to the Free Software 23 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | // 25 | 26 | using Quartz; 27 | 28 | namespace XG.Plugin.Irc.Job 29 | { 30 | public class TimerTrigger : IJob 31 | { 32 | public Plugin Plugin { get; set; } 33 | 34 | public void Execute (IJobExecutionContext context) 35 | { 36 | Plugin.TriggerTimer(); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /XG.Plugin.Irc/Parser/Helper.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Helper.cs 3 | // This file is part of XG - XDCC Grabscher 4 | // http://www.larsformella.de/lang/en/portfolio/programme-software/xg 5 | // 6 | // Author: 7 | // Lars Formella 8 | // 9 | // Copyright (c) 2012 Lars Formella 10 | // 11 | // This program is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU General Public License as published by 13 | // the Free Software Foundation; either version 2 of the License, or 14 | // (at your option) any later version. 15 | // 16 | // This program is distributed in the hope that it will be useful, 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU General Public License 22 | // along with this program; if not, write to the Free Software 23 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | // 25 | 26 | using System; 27 | using System.Text.RegularExpressions; 28 | 29 | namespace XG.Plugin.Irc.Parser 30 | { 31 | public static class Helper 32 | { 33 | public static string Magicstring = @"((\*|:){2,3}|->|<-|)"; 34 | 35 | public static string RemoveSpecialIrcChars(string aData) 36 | { 37 | string tData = Regex.Replace(aData, @"[\x02\x1F\x0F\x16]|\x03(\d\d?(,\d\d?)?)?", String.Empty); 38 | return tData.Trim(); 39 | } 40 | 41 | public static Match Match(string aMessage, string[] aRegexes) 42 | { 43 | Match match = null; 44 | foreach (string regex in aRegexes) 45 | { 46 | match = Match(aMessage, regex); 47 | if (match.Success) 48 | { 49 | return match; 50 | } 51 | } 52 | return match; 53 | } 54 | 55 | public static Match Match(string aMessage, string aRegex) 56 | { 57 | return Regex.Match(aMessage, aRegex, RegexOptions.IgnoreCase); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /XG.Plugin.Irc/Parser/Message.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Message.cs 3 | // This file is part of XG - XDCC Grabscher 4 | // http://www.larsformella.de/lang/en/portfolio/programme-software/xg 5 | // 6 | // Author: 7 | // Lars Formella 8 | // 9 | // Copyright (c) 2013 Lars Formella 10 | // 11 | // This program is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU General Public License as published by 13 | // the Free Software Foundation; either version 2 of the License, or 14 | // (at your option) any later version. 15 | // 16 | // This program is distributed in the hope that it will be useful, 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU General Public License 22 | // along with this program; if not, write to the Free Software 23 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | // 25 | 26 | using XG.Model.Domain; 27 | 28 | namespace XG.Plugin.Irc.Parser 29 | { 30 | public class Message 31 | { 32 | public Channel Channel { get; set; } 33 | 34 | public string Nick { get; set; } 35 | 36 | public string Text { get; set; } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /XG.Plugin.Irc/Parser/Types/AParserWithExistingBot.cs: -------------------------------------------------------------------------------- 1 | // 2 | // AIrcParserWithExistingBot.cs 3 | // This file is part of XG - XDCC Grabscher 4 | // http://www.larsformella.de/lang/en/portfolio/programme-software/xg 5 | // 6 | // Author: 7 | // Lars Formella 8 | // 9 | // Copyright (c) 2013 Lars Formella 10 | // 11 | // This program is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU General Public License as published by 13 | // the Free Software Foundation; either version 2 of the License, or 14 | // (at your option) any later version. 15 | // 16 | // This program is distributed in the hope that it will be useful, 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU General Public License 22 | // along with this program; if not, write to the Free Software 23 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | // 25 | 26 | using XG.Model.Domain; 27 | 28 | namespace XG.Plugin.Irc.Parser.Types 29 | { 30 | public abstract class AParserWithExistingBot : AParser 31 | { 32 | public override bool Parse(Message aMessage) 33 | { 34 | bool result = false; 35 | Bot tBot = aMessage.Channel.Bot(aMessage.Nick); 36 | if (tBot != null) 37 | { 38 | result = ParseInternal(tBot, aMessage.Text); 39 | 40 | if (result) 41 | { 42 | Log.Info("Parse() message from " + tBot + ": " + aMessage.Text); 43 | } 44 | 45 | // set em to connected if it isnt already 46 | tBot.Connected = true; 47 | tBot.Commit(); 48 | } 49 | return result; 50 | } 51 | 52 | protected abstract bool ParseInternal(Bot aBot, string aMessage); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /XG.Plugin.Irc/Parser/Types/ASaveBotMessageParser.cs: -------------------------------------------------------------------------------- 1 | // 2 | // ASaveBotMessageParser.cs 3 | // This file is part of XG - XDCC Grabscher 4 | // http://www.larsformella.de/lang/en/portfolio/programme-software/xg 5 | // 6 | // Author: 7 | // Lars Formella 8 | // 9 | // Copyright (c) 2013 Lars Formella 10 | // 11 | // This program is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU General Public License as published by 13 | // the Free Software Foundation; either version 2 of the License, or 14 | // (at your option) any later version. 15 | // 16 | // This program is distributed in the hope that it will be useful, 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU General Public License 22 | // along with this program; if not, write to the Free Software 23 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | // 25 | 26 | using XG.Model.Domain; 27 | 28 | namespace XG.Plugin.Irc.Parser.Types 29 | { 30 | public abstract class ASaveBotMessageParser : AParser 31 | { 32 | public override bool Parse(Message aMessage) 33 | { 34 | bool result = false; 35 | Bot tBot = aMessage.Channel.Bot(aMessage.Nick); 36 | if (tBot != null) 37 | { 38 | result = ParseInternal(tBot, aMessage.Text); 39 | 40 | if (result) 41 | { 42 | Log.Info("Parse() message from " + tBot + ": " + aMessage.Text); 43 | tBot.LastMessage = aMessage.Text; 44 | } 45 | 46 | // set em to connected if it isnt already 47 | tBot.Connected = true; 48 | tBot.Commit(); 49 | } 50 | return result; 51 | } 52 | 53 | protected abstract bool ParseInternal(Bot aBot, string aMessage); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /XG.Plugin.Irc/Parser/Types/Dcc/Version.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Version.cs 3 | // This file is part of XG - XDCC Grabscher 4 | // http://www.larsformella.de/lang/en/portfolio/programme-software/xg 5 | // 6 | // Author: 7 | // Lars Formella 8 | // 9 | // Copyright (c) 2013 Lars Formella 10 | // 11 | // This program is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU General Public License as published by 13 | // the Free Software Foundation; either version 2 of the License, or 14 | // (at your option) any later version. 15 | // 16 | // This program is distributed in the hope that it will be useful, 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU General Public License 22 | // along with this program; if not, write to the Free Software 23 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | // 25 | 26 | using System; 27 | using XG.Extensions; 28 | using XG.Model.Domain; 29 | 30 | namespace XG.Plugin.Irc.Parser.Types.Dcc 31 | { 32 | public class Version : AParser 33 | { 34 | public override bool Parse(Message aMessage) 35 | { 36 | if (aMessage.Text.StartsWith("\u0001VERSION ", StringComparison.Ordinal)) 37 | { 38 | CheckVersion(aMessage.Channel, aMessage.Nick, aMessage.Text.Substring(9)); 39 | return true; 40 | } 41 | return false; 42 | } 43 | 44 | void CheckVersion(Channel aChannel, string aNick, string aVersion) 45 | { 46 | Log.Info("Parse() received version reply from " + aNick + ": " + aVersion); 47 | if (aVersion.ToLower().Contains("iroffer")) 48 | { 49 | FireXdccList(this, new EventArgs(aChannel, aNick, "XDCC HELP")); 50 | } 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /XG.Plugin.Irc/Parser/Types/Info/Join.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Join.cs 3 | // This file is part of XG - XDCC Grabscher 4 | // http://www.larsformella.de/lang/en/portfolio/programme-software/xg 5 | // 6 | // Author: 7 | // Lars Formella 8 | // 9 | // Copyright (c) 2012 Lars Formella 10 | // 11 | // This program is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU General Public License as published by 13 | // the Free Software Foundation; either version 2 of the License, or 14 | // (at your option) any later version. 15 | // 16 | // This program is distributed in the hope that it will be useful, 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU General Public License 22 | // along with this program; if not, write to the Free Software 23 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | // 25 | 26 | using XG.Extensions; 27 | using XG.Model.Domain; 28 | 29 | namespace XG.Plugin.Irc.Parser.Types.Info 30 | { 31 | public class Join : AParserWithExistingBot 32 | { 33 | protected override bool ParseInternal(Bot aBot, string aMessage) 34 | { 35 | string[] regexes = 36 | { 37 | @".*\s+JOIN (?[^\s]+).*" 38 | }; 39 | var match = Helper.Match(aMessage, regexes); 40 | if (match.Success) 41 | { 42 | string channel = match.Groups["channel"].ToString(); 43 | if (!channel.StartsWith("#", System.StringComparison.CurrentCulture)) 44 | { 45 | channel = "#" + channel; 46 | } 47 | FireJoinChannel(this, new EventArgs(aBot.Parent.Parent, channel)); 48 | } 49 | return match.Success; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /XG.Plugin.Irc/Parser/Types/Xdcc/NotInQueue.cs: -------------------------------------------------------------------------------- 1 | // 2 | // NotInQueue.cs 3 | // This file is part of XG - XDCC Grabscher 4 | // http://www.larsformella.de/lang/en/portfolio/programme-software/xg 5 | // 6 | // Author: 7 | // Lars Formella 8 | // 9 | // Copyright (c) 2012 Lars Formella 10 | // 11 | // This program is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU General Public License as published by 13 | // the Free Software Foundation; either version 2 of the License, or 14 | // (at your option) any later version. 15 | // 16 | // This program is distributed in the hope that it will be useful, 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU General Public License 22 | // along with this program; if not, write to the Free Software 23 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | // 25 | 26 | using XG.Config.Properties; 27 | using XG.Extensions; 28 | using XG.Model.Domain; 29 | 30 | namespace XG.Plugin.Irc.Parser.Types.Xdcc 31 | { 32 | public class NotInQueue : ASaveBotMessageParser 33 | { 34 | protected override bool ParseInternal(Bot aBot, string aMessage) 35 | { 36 | string[] regexes = 37 | { 38 | "(You Don't Appear To Be In A Queue|Removed you from the queue for.*)" 39 | }; 40 | var match = Helper.Match(aMessage, regexes); 41 | if (match.Success) 42 | { 43 | if (aBot.State == Bot.States.Waiting) 44 | { 45 | aBot.State = Bot.States.Idle; 46 | } 47 | aBot.QueuePosition = 0; 48 | FireQueueRequestFromBot(this, new EventArgs(aBot, Settings.Default.CommandWaitTime)); 49 | } 50 | return match.Success; 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /XG.Plugin.Irc/Parser/Types/Xdcc/OwnerRequest.cs: -------------------------------------------------------------------------------- 1 | // 2 | // OwnerRequest.cs 3 | // This file is part of XG - XDCC Grabscher 4 | // http://www.larsformella.de/lang/en/portfolio/programme-software/xg 5 | // 6 | // Author: 7 | // Lars Formella 8 | // 9 | // Copyright (c) 2012 Lars Formella 10 | // 11 | // This program is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU General Public License as published by 13 | // the Free Software Foundation; either version 2 of the License, or 14 | // (at your option) any later version. 15 | // 16 | // This program is distributed in the hope that it will be useful, 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU General Public License 22 | // along with this program; if not, write to the Free Software 23 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 | // 25 | 26 | using XG.Extensions; 27 | using XG.Model.Domain; 28 | 29 | namespace XG.Plugin.Irc.Parser.Types.Xdcc 30 | { 31 | public class OwnerRequest : ASaveBotMessageParser 32 | { 33 | protected override bool ParseInternal(Bot aBot, string aMessage) 34 | { 35 | string[] regexes = 36 | { 37 | Helper.Magicstring + " The Owner Has Requested That No New Connections Are Made In The Next (?