fCraft.IRC.SendAction C# (CSharp) Method

SendAction() public static method

public static SendAction ( [ line ) : void
line [
return void
        public static void SendAction( [NotNull] string line ) {
            if ( line == null )
                throw new ArgumentNullException( "line" );
            if ( channelNames == null )
                return; // in case IRC bot is disabled.
            line = ProcessMessageToIRC( line );
            for ( int i = 0; i < channelNames.Length; i++ ) {
                SendRawMessage( IRCCommands.Privmsg( channelNames[i], "\u0001ACTION " ), line, "\u0001" );
            }
        }

Usage Example

Example #1
0
        private static void BroMode(Player player, Command command)
        {
            if (!Utils.BroMode.Active)
            {
                foreach (Player p in Server.Players)
                {
                    Utils.BroMode.GetInstance().RegisterPlayer(p);
                }
                Utils.BroMode.Active = true;
                Server.Players.Message("{0}&S turned Bro mode on.", player.Info.Rank.Color + player.Name);

                IRC.SendAction(player.Name + " &Sturned Bro mode on.");
            }
            else
            {
                foreach (Player p in Server.Players)
                {
                    Utils.BroMode.GetInstance().UnregisterPlayer(p);
                }

                Utils.BroMode.Active = false;
                Server.Players.Message("{0}&S turned Bro Mode off.", player.Info.Rank.Color + player.Name);
                IRC.SendAction(player.Name + " &Sturned Bro mode off");
            }
        }
All Usage Examples Of fCraft.IRC::SendAction