I think chat say is only for lines starting with your nick. Isn't "message.Mid(i3,s1.Length()) == s1" always true if i3 is the location of s1? Couldn't it just be replaced with "if ( i3 != -1 )"?
And the patch seems to need some reformatting, but in general I suppose a different colour for OP nicks is a good idea.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
File to patch: valknut/dcchat.cpp
patching file valknut/dcchat.cpp
Hunk #1 succeeded at 1233 (offset -22 lines).
Hunk #2 succeeded at 1263 (offset -29 lines).
Hunk #3 succeeded at 1415 (offset -29 lines).
Hunk #4 succeeded at 1431 (offset -29 lines).
can't find file to patch at input line 88
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|--- dcconfig.h 2007/01/23 09:48:271.1
|+++ dcconfig.h 2007/01/23 18:24:291.2
--------------------------
File to patch: valknut/dcconfig.h
patching file valknut/dcconfig.h
Hunk #1 FAILED at 114.
Hunk #2 FAILED at 714.
2 out of 2 hunks FAILED -- saving rejects to file valknut/dcconfig.h.rej
Logged In: YES
user_id=1639740
Originator: NO
I'm not sure about this change:
+/*
if ( message.Left(s1.Length()) == s1 )
{
bSay = TRUE;
// message = message.Right( message.Length() - s1.Length() );
}
+*/
+ i3 = message.Find(s1);
+
+ if ( message.Mid(i3,s1.Length()) == s1 )
+ {
+ bSay = TRUE;
+ }
I think chat say is only for lines starting with your nick. Isn't "message.Mid(i3,s1.Length()) == s1" always true if i3 is the location of s1? Couldn't it just be replaced with "if ( i3 != -1 )"?
And the patch seems to need some reformatting, but in general I suppose a different colour for OP nicks is a good idea.
Logged In: YES
user_id=1736375
Originator: YES
This change is tested. Sory i`m not delete this code.
I just colored the line where my nickname without :
Logged In: YES
user_id=1438413
Originator: NO
File to patch: valknut/dcchat.cpp
patching file valknut/dcchat.cpp
Hunk #1 succeeded at 1233 (offset -22 lines).
Hunk #2 succeeded at 1263 (offset -29 lines).
Hunk #3 succeeded at 1415 (offset -29 lines).
Hunk #4 succeeded at 1431 (offset -29 lines).
can't find file to patch at input line 88
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|--- dcconfig.h 2007/01/23 09:48:271.1
|+++ dcconfig.h 2007/01/23 18:24:291.2
--------------------------
File to patch: valknut/dcconfig.h
patching file valknut/dcconfig.h
Hunk #1 FAILED at 114.
Hunk #2 FAILED at 714.
2 out of 2 hunks FAILED -- saving rejects to file valknut/dcconfig.h.rej
valknut/dcconfig.h.rej:
***************
*** 114,119 ****
eccPUBLICPRIVATECHATTEXT,
eccCHATSAY,
eccPUBLICCHATMENICK,
} eChatColor;
typedef enum eClientColumn {
--- 114,120 ----
eccPUBLICPRIVATECHATTEXT,
eccCHATSAY,
eccPUBLICCHATMENICK,
+ eccOPNICK,
} eChatColor;
typedef enum eClientColumn {
***************
*** 713,718 ****
/** */
CString m_sChatColor_18;
/** */
bool bOpenClientWindowsMinimized;
/** */
bool m_bChatShowJoinsAndParts;
--- 714,721 ----
/** */
CString m_sChatColor_18;
/** */
+ CString m_sChatColor_19;
+ /** */
bool bOpenClientWindowsMinimized;
/** */
bool m_bChatShowJoinsAndParts;
Logged In: YES
user_id=1639740
Originator: NO
I've now added a similar patch to subversion to allow the colour for the OP's nicks to be set, without the other changes to chat say highlighting.