Skip to content

Instantly share code, notes, and snippets.

@peppy
Created February 4, 2013 04:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save peppy/4704955 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Text;
using osu_common.Bancho.Requests;
namespace osu_common.Bancho
{
public class SlimClient
{
public SlimClient()
{
}
public SlimClient(string username)
{
Username = username;
}
public RequestTarget RequestTargetType;
public string IrcFullName { get { return UsernameUnderscored + "!cho@ppy.sh"; } }
public string Address;
public bool IsAdmin;
public bool IsPrivileged; //can access priv'd channel
public int UserId;
protected string username;
public string UsernameUnderscored;
public virtual string Username
{
get { return username; }
set
{
username = value;
UsernameUnderscored = Username.Replace(' ', '_');
}
}
public string IrcPrefix
{
get
{
if (IsAdmin)
return "@";
if (RequestTargetType == RequestTarget.Irc)
return "+";
return string.Empty;
}
}
public override string ToString()
{
return Username;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment