当前位置: 首页>>代码示例>>C#>>正文


C# ChatUser.GetColorCharacter方法代码示例

本文整理汇总了C#中Server.Engines.Chat.ChatUser.GetColorCharacter方法的典型用法代码示例。如果您正苦于以下问题:C# ChatUser.GetColorCharacter方法的具体用法?C# ChatUser.GetColorCharacter怎么用?C# ChatUser.GetColorCharacter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Server.Engines.Chat.ChatUser的用法示例。


在下文中一共展示了ChatUser.GetColorCharacter方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: EmoteMessage

		public static void EmoteMessage( ChatUser from, Channel channel, string param )
		{
			if ( channel.CanTalk( from ) )
				channel.SendIgnorableMessage( 58, from, from.GetColorCharacter() + from.Username, param ); // %1 %2
			else
				from.SendMessage( 36 ); // The moderator of this conference has not given you speaking priviledges.
		}
开发者ID:Godkong,项目名称:RunUO,代码行数:7,代码来源:ChatActionHandlers.cs

示例2: AddUser

		public void AddUser( ChatUser user )
		{
			if ( Contains( user ) )
			{
				user.SendMessage( 46, m_Name ); // You are already in the conference '%1'.
			}
			else
			{
				if ( user.CurrentChannel != null )
					user.CurrentChannel.RemoveUser( user ); // Remove them from their current channel first

				ChatSystem.SendCommandTo( user.Mobile, ChatCommand.JoinedChannel, m_Name );

				SendCommand( ChatCommand.AddUserToChannel, user.GetColorCharacter() + user.Username );

				m_Users.Add( user );
				user.CurrentChannel = this;

				SendUsersTo( user );

				ChatLogging.LogJoin( this.Name, user.Username );
			}
		}
开发者ID:zerodowned,项目名称:justuo-with-ec-support,代码行数:23,代码来源:Channel.cs

示例3: RemoveModerator

		public void RemoveModerator( ChatUser user, ChatUser moderator )
		{
			if ( !ValidateModerator( moderator ) || !ValidateAccess( moderator, user ) )
				return;

			if ( IsModerator( user ) )
			{
				m_Moderators.Remove( user );

				if ( moderator != null )
					user.SendMessage( 49, moderator.Username ); // %1 has removed you from the list of conference moderators.

				SendMessage( 47, user, user.Username ); // %1 is no longer a conference moderator.
				SendCommand( ChatCommand.AddUserToChannel, user.GetColorCharacter() + user.Username );
			}
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:16,代码来源:Channel.cs

示例4: AddModerator

		public void AddModerator( ChatUser user, ChatUser moderator )
		{
			if ( !ValidateModerator( moderator ) )
				return;

			if ( IsBanned( user ) || IsModerator( user ) )
				return;

			if ( IsVoiced( user ) )
				m_Voices.Remove( user );

			m_Moderators.Add( user );

			if ( moderator != null )
				user.SendMessage( 50, moderator.Username ); // %1 has made you a conference moderator.

			SendMessage( 48, user, user.Username ); // %1 is now a conference moderator.
			SendCommand( ChatCommand.AddUserToChannel, user.GetColorCharacter() + user.Username );
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:19,代码来源:Channel.cs

示例5: RemoveVoiced

		public void RemoveVoiced( ChatUser user, ChatUser moderator )
		{
			if ( !ValidateModerator( moderator ) || !ValidateAccess( moderator, user ) )
				return;

			if ( !IsModerator( user ) && IsVoiced( user ) )
			{
				m_Voices.Remove( user );

				if ( moderator != null )
					user.SendMessage( 53, moderator.Username ); // %1, a conference moderator, has removed your speaking priviledges for this conference.

				SendMessage( 51, user, user.Username ); // %1 no longer has speaking privileges in this conference.
				SendCommand( ChatCommand.AddUserToChannel, user, user.GetColorCharacter() + user.Username );
			}
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:16,代码来源:Channel.cs

示例6: AddVoiced

		public void AddVoiced( ChatUser user, ChatUser moderator )
		{
			if ( !ValidateModerator( moderator ) )
				return;

			if ( !IsBanned( user ) && !IsModerator( user ) && !IsVoiced( user ) )
			{
				m_Voices.Add( user );

				if ( moderator != null )
					user.SendMessage( 54, moderator.Username ); // %1, a conference moderator, has granted you speaking priviledges in this conference.

				SendMessage( 52, user, user.Username ); // %1 now has speaking privileges in this conference.
				SendCommand( ChatCommand.AddUserToChannel, user, user.GetColorCharacter() + user.Username );
			}
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:16,代码来源:Channel.cs

示例7: Kick

		public void Kick( ChatUser user, ChatUser moderator, bool wasBanned )
		{
			if ( !ValidateModerator( moderator ) || !ValidateAccess( moderator, user ) )
				return;

			if ( Contains( user ) )
			{
				if ( moderator != null )
				{
					if ( wasBanned )
						user.SendMessage( 63, moderator.Username ); // %1, a conference moderator, has banned you from the conference.
					else
						user.SendMessage( 45, moderator.Username ); // %1, a conference moderator, has kicked you out of the conference.
				}

				RemoveUser( user );
				ChatSystem.SendCommandTo( user.Mobile, ChatCommand.AddUserToChannel, user.GetColorCharacter() + user.Username );

				SendMessage( 44, user.Username ) ; // %1 has been kicked out of the conference.
			}

			if ( wasBanned && moderator != null )
				moderator.SendMessage( 62, user.Username ); // You are banning %1 from this conference.
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:24,代码来源:Channel.cs

示例8: AddUser

		public bool AddUser( ChatUser user, string password )
		{
			if ( Contains( user ) )
			{
				user.SendMessage( 46, m_Name ); // You are already in the conference '%1'.
				return true;
			}
			else if ( IsBanned( user ) )
			{
				user.SendMessage( 64 ); // You have been banned from this conference.
				return false;
			}
			else if ( !ValidatePassword( password ) )
			{
				user.SendMessage( 34 ); // That is not the correct password.
				return false;
			}
			else
			{
				if ( user.CurrentChannel != null )
					user.CurrentChannel.RemoveUser( user ); // Remove them from their current channel first

				ChatSystem.SendCommandTo( user.Mobile, ChatCommand.JoinedChannel, m_Name );

				SendCommand( ChatCommand.AddUserToChannel, user.GetColorCharacter() + user.Username );

				m_Users.Add( user );
				user.CurrentChannel = this;

				if ( user.Mobile.AccessLevel >= AccessLevel.GameMaster || (!m_AlwaysAvailable && m_Users.Count == 1) )
					AddModerator( user );

				SendUsersTo( user );

				return true;
			}
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:37,代码来源:Channel.cs

示例9: PrivateMessage

		public static void PrivateMessage( ChatUser from, Channel channel, string param )
		{	// stop crash by ensuring we don't continue processing if indexOf == -1
			param = param.Trim();
			int indexOf = param.IndexOf( ' ' );
			if (indexOf >= 0)
			{
				string name = param.Substring(0, indexOf);
				string text = param.Substring(indexOf + 1);

				ChatUser target = ChatSystem.SearchForUser(from, name);

				if (target == null)
					return;

				if (target.IsIgnored(from))
					from.SendMessage(35, target.Username); // %1 has chosen to ignore you. None of your messages to them will get through.
				else if (target.IgnorePrivateMessage)
					from.SendMessage(42, target.Username); // %1 has chosen to not receive private messages at the moment.
				else
					target.SendMessage(59, from.Mobile, from.GetColorCharacter() + from.Username, text); // [%1]: %2
			}
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:22,代码来源:ChatActionHandlers.cs

示例10: ChannelMessage

		public static void ChannelMessage( ChatUser from, Channel channel, string param )
		{
			channel.SendMessage( 57, from, from.GetColorCharacter() + from.Username, String.Format( "{{{0}}} {1}", channel.Name, param ) ); // %1: %2
			ChatLogging.LogMessage( channel.Name, from.Username, param );
		}
开发者ID:zerodowned,项目名称:justuo-with-ec-support,代码行数:5,代码来源:ChatActionHandlers.cs


注:本文中的Server.Engines.Chat.ChatUser.GetColorCharacter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。