mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-16 18:19:38 -05:00
-first official stable release
-fixed last known error (due to web front passing invalid sql syntax) -re-added stats. though still not working 100% -added welcome plugin
This commit is contained in:
62
Welcome Plugin/Main.cs
Normal file
62
Welcome Plugin/Main.cs
Normal file
@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SharedLibrary;
|
||||
|
||||
namespace Welcome_Plugin
|
||||
{
|
||||
public class Main : Plugin
|
||||
{
|
||||
public override string Author
|
||||
{
|
||||
get
|
||||
{
|
||||
return "RaidMax";
|
||||
}
|
||||
}
|
||||
|
||||
public override float Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Welcome Plugin";
|
||||
}
|
||||
}
|
||||
|
||||
public override void onEvent(Event E)
|
||||
{
|
||||
if (E.Type == Event.GType.Connect)
|
||||
{
|
||||
Player newPlayer = E.Origin;
|
||||
|
||||
if (newPlayer.Level > Player.Permission.User)
|
||||
E.Owner.Broadcast(Utilities.levelToColor(newPlayer.Level) + " ^5" + newPlayer.Name + " ^7has joined the server.");
|
||||
|
||||
else
|
||||
{
|
||||
CountryLookupProj.CountryLookup CLT = new CountryLookupProj.CountryLookup("GeoIP.dat");
|
||||
E.Owner.Broadcast("^5" + newPlayer.Name + " ^7hails from ^5" + CLT.lookupCountryName(newPlayer.IP));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void onLoad()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
public override void onUnload()
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user