コード例 #1
0
    private void OnIRCErrorEvent(string[] tokens, string message)
    {
        IRCErrorEvent err = new IRCErrorEvent();

        err.Message = message;

        //-- Display attribute error if the format is ":ADDRESS DATA NICK (ATTRIBUTE) :MESSAGE"
        string attr = tokens[3];

        if (attr.Substring(0, 1) != ":")
        {
            err.Message += " \"" + attr + "\"";
        }

        DispatchEvent(err);
    }
コード例 #2
0
    public void ErrorEventHandler(IRCEvent e)
    {
        IRCErrorEvent errorEvent = (IRCErrorEvent)e;

        LogText("[General Error]" + errorEvent.Message);

        switch (m_state)
        {
        case eState.verifying_nick:
            OutputText("[Can't Verify Nick] " + errorEvent.Message);
            m_ircNick = m_ircNick + "_";           // Try changing the nick we use in case some jerk already took it
            SetState(eState.failed);
            break;

        case eState.joining_game_channel:
            OutputText("[Can't Join Channel] " + errorEvent.Message);
            m_ircChannelName = m_ircChannelName + "_";             // Try changing the channel name in case some jerk already took it.
            SetState(eState.failed);
            break;
        }
    }
コード例 #3
0
    private void OnIRCErrorEvent(string[] tokens, string message)
    {
        IRCErrorEvent err = new IRCErrorEvent();

        err.Message = message;

        //-- Display attribute error if the format is ":ADDRESS DATA NICK (ATTRIBUTE) :MESSAGE"
        string attr = tokens[ 3 ];
        if ( attr.Substring( 0, 1 ) != ":" )
        {
            err.Message += " \"" + attr + "\"";
        }

        DispatchEvent( err );
    }