added beginnings of auctionbot

master
KoopaTroopa 8 years ago
parent 0d83db4526
commit 25c99cb31c

@ -0,0 +1,17 @@
K 25
svn:wc:ra_dav:version-url
V 30
/svn/!svn/ver/2/trunk/GMCPEcho
END
GMCPEcho.csproj
K 25
svn:wc:ra_dav:version-url
V 46
/svn/!svn/ver/2/trunk/GMCPEcho/GMCPEcho.csproj
END
GMCPEcho.cs
K 25
svn:wc:ra_dav:version-url
V 42
/svn/!svn/ver/2/trunk/GMCPEcho/GMCPEcho.cs
END

@ -0,0 +1,5 @@
[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
IconIndex=16

@ -0,0 +1,5 @@
K 14
bugtraq:number
V 4
true
END

@ -0,0 +1,99 @@
10
dir
58
http://proxymud.googlecode.com/svn/trunk/GMCPEcho
http://proxymud.googlecode.com/svn
2012-01-17T10:55:35.805502Z
2
default8p@gmail.com
has-props
8a6e9f07-fe1d-2472-fcf8-0b435762827a
GMCPEcho.csproj
file
2016-03-25T22:18:43.064138Z
76fb0ddd83ae3b24fd40628d322b5e47
2012-01-17T10:55:35.805502Z
2
default8p@gmail.com
2718
GMCPEcho.cs
file
2016-03-25T22:18:43.064138Z
9aaa0c4c8ac82fc1c1898d1cefd5cde5
2012-01-17T10:55:35.805502Z
2
default8p@gmail.com
2717
Properties
dir

@ -0,0 +1,5 @@
[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
IconIndex=16

@ -0,0 +1,5 @@
[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
IconIndex=16

@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ProxyCore.Scripting;
using ProxyCore;
using ProxyCore.Output;
namespace GMCPEcho
{
public class GMCPEcho : Plugin
{
public GMCPEcho()
: base("gmcpecho", "GMCP Echo")
{
Author = "Duckbat";
Version = 1;
Description = "Echos all GMCP specified by user back. This way you can see GMCP in clients that normally don't support it.";
UpdateUrl = "www.duckbat.com/plugins/update.gmcpecho.txt";
Website = "www.duckbat.com/plugins/index.php?t=gmcpecho";
Config = new GMCPEchoConfig();
RegisterTrigger("gmcp", @"^\$gmcp\.", GMCPTrigger);
}
private string[] AllowedModules;
private bool GMCPTrigger(TriggerData t)
{
if(AllowedModules == null)
AllowedModules = Config.GetString("GMCP.Modules", "gmcp.*").Split(new[] { ",", " " }, StringSplitOptions.RemoveEmptyEntries);
string Module = t.Msg.Msg.Substring(1);
if(Module.Contains(' '))
Module = Module.Substring(0, Module.IndexOf(' '));
if(HasModule(Module))
World.Instance.SendMessage(t.Msg.Msg, Config.GetUInt64("GMCP.AuthMask", ulong.MaxValue));
return false;
}
private bool HasModule(string Msg)
{
foreach(string x in AllowedModules)
{
if(x.EndsWith("*"))
{
if(Msg.StartsWith(x.Substring(0, x.Length - 1)))
return true;
continue;
}
if(x == Msg)
return true;
}
return false;
}
}
public class GMCPEchoConfig : ConfigFile
{
protected override void OnCreated()
{
base.OnCreated();
CreateSetting("GMCP.Modules", "gmcp.*", "Which GMCP modules would you like to echo to client. Separate with ',' sign and use '*' for wildcard but the wildcard can only be at the end not in the middle or start. For example \"gmcp.char.*, gmcp.room.*\". Use \"gmcp.*\" to echo everything.");
CreateSetting("GMCP.AuthMask", ulong.MaxValue, "Which client security levels see GMCP echo. This is a 64 bit mask. For example if you want security level 1 and 3 to see GMCP you would enter value 5 (1 + 4). These values are 2 ^ (level - 1), for example security level 3 mask: 2 ^ (3 - 1) = 4. Then you just add these up. Default (all levels): " + ulong.MaxValue);
}
}
}

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{86B2AA8D-5B03-4128-9C77-9E94F71CFFEE}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>GMCPEcho</RootNamespace>
<AssemblyName>GMCPEcho</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="ProxyCore, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\ProxyCore\bin\ProxyCore.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="GMCPEcho.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

@ -0,0 +1,5 @@
[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
IconIndex=16

@ -0,0 +1,5 @@
[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
IconIndex=16

@ -0,0 +1,5 @@
[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
IconIndex=16

@ -0,0 +1,5 @@
[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
IconIndex=16

@ -0,0 +1,5 @@
[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
IconIndex=16

@ -0,0 +1,66 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ProxyCore.Scripting;
using ProxyCore;
using ProxyCore.Output;
namespace AuctionData
{
public class AuctionData : Plugin
{
public AuctionData()
: base("AuctionData", "GMCP Echo")
{
Author = "KoopaTroopa";
Version = 1;
Description = "Echos all GMCP specified by user back. This way you can see GMCP in clients that normally don't support it.";
UpdateUrl = "www.duckbat.com/plugins/update.AuctionData.txt";
Website = "www.duckbat.com/plugins/index.php?t=AuctionData";
Config = new AuctionDataConfig();
RegisterTrigger("marketsalecomp", @"^\$gmcp\.comm\.channel\.msg @\wMarket: (?<item>.+) \(Level .+, Num .+\) [Ss][Oo][Ll][Dd] to (?<buyer>\w+) for (?<price>.+) (?<currency>[Gg]old|TP|QP)\.", CaptureTrigger);
RegisterTrigger("aucsalecomp", @"^\$gmcp\.comm\.channel\.msg @\wAuction: (?<item>.+) [Ss][Oo][Ll][Dd] to (?<buyer>\w+) for (?<price>.+) (?<currency>gold)\.", CaptureTrigger);
}
private string[] AllowedModules;
private bool CaptureTrigger(TriggerData t)
{
World.Instance.SendMessage(t.Msg.Msg, Config.GetUInt64("Auc.AuthMask", ulong.MaxValue));
//World.Instance.SendMessage("@w{CommandEcho,Level=" + AuthLevel + ",Id=" + ClientId + "}" + Msg, Config.GetUInt64("Echo.To.AuthMask", ulong.MaxValue - 1));
}
private bool HasModule(string Msg)
{
foreach(string x in AllowedModules)
{
if(x.EndsWith("*"))
{
if(Msg.StartsWith(x.Substring(0, x.Length - 1)))
return true;
continue;
}
if(x == Msg)
return true;
}
return false;
}
}
public class AuctionDataConfig : ConfigFile
{
protected override void OnCreated()
{
base.OnCreated();
CreateSetting("GMCP.Modules", "gmcp.*", "Which GMCP modules would you like to echo to client. Separate with ',' sign and use '*' for wildcard but the wildcard can only be at the end not in the middle or start. For example \"gmcp.char.*, gmcp.room.*\". Use \"gmcp.*\" to echo everything.");
CreateSetting("Auc.AuthMask", ulong.MaxValue, "Which client security levels see GMCP echo. This is a 64 bit mask. For example if you want security level 1 and 3 to see GMCP you would enter value 5 (1 + 4). These values are 2 ^ (level - 1), for example security level 3 mask: 2 ^ (3 - 1) = 4. Then you just add these up. Default (all levels): " + ulong.MaxValue);
}
}
}

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{86B2AA8D-5B03-4128-9C77-9E94F71CFFEE}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>GMCPEcho</RootNamespace>
<AssemblyName>GMCPEcho</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\..\..\Desktop\MushProxy-Build\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\..\..\Desktop\MushProxy-Build\Plugins\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="ProxyCore, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\ProxyCore\bin\ProxyCore.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="GMCPEcho.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

@ -0,0 +1,11 @@
K 25
svn:wc:ra_dav:version-url
V 41
/svn/!svn/ver/2/trunk/GMCPEcho/Properties
END
AssemblyInfo.cs
K 25
svn:wc:ra_dav:version-url
V 57
/svn/!svn/ver/2/trunk/GMCPEcho/Properties/AssemblyInfo.cs
END

@ -0,0 +1,5 @@
[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
IconIndex=16

@ -0,0 +1,5 @@
K 14
bugtraq:number
V 4
true
END

@ -0,0 +1,62 @@
10
dir
58
http://proxymud.googlecode.com/svn/trunk/GMCPEcho/Properties
http://proxymud.googlecode.com/svn
2012-01-17T10:55:35.805502Z
2
default8p@gmail.com
has-props
8a6e9f07-fe1d-2472-fcf8-0b435762827a
AssemblyInfo.cs
file
2016-03-25T22:18:43.064138Z
df762a418f90d48e08731801bf1106b8
2012-01-17T10:55:35.805502Z
2
default8p@gmail.com
1428

@ -0,0 +1,5 @@
[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
IconIndex=16

@ -0,0 +1,5 @@
[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
IconIndex=16

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("GMCPEcho")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("GMCPEcho")]
[assembly: AssemblyCopyright("Copyright © 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("692b7a44-ef7f-4680-a81c-8f013fe8fb4f")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,5 @@
[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
IconIndex=16

@ -0,0 +1,5 @@
[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
IconIndex=16

@ -0,0 +1,5 @@
[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
IconIndex=16

@ -0,0 +1,5 @@
[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
IconIndex=16

@ -0,0 +1,5 @@
[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
IconIndex=16

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("GMCPEcho")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("GMCPEcho")]
[assembly: AssemblyCopyright("Copyright © 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("692b7a44-ef7f-4680-a81c-8f013fe8fb4f")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,5 @@
[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
IconIndex=16

@ -0,0 +1,5 @@
[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files (x86)\Google\Drive\googledrivesync.exe
IconIndex=16

@ -74,6 +74,7 @@ namespace MudLog
f.WriteLine(
string.Format("[" + "{0:D2}" + ":" + "{1:D2}" + ":" + "{2:D2}" + "] ", DateTime.Now.Hour,
DateTime.Now.Minute, DateTime.Now.Second) + m);
//$gmcp.comm.channel.msg Floki MUSIC: -- Floki = Player MUSIC = channel
}
}

Loading…
Cancel
Save