Skip to content

Commit f6d33c7

Browse files
committed
The [Telnet] hyperlink only appears if non-zero counts
1 parent d24d7a1 commit f6d33c7

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

world_debug.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,16 +1381,22 @@ VARIANT CMUSHclientDoc::Debug(LPCTSTR Command)
13811381

13821382
// telnet negotiation
13831383

1384-
Tell (TFormat ("Telnet (IAC) received: DO: %ld, DONT: %ld, WILL: %ld, WONT: %ld, SB: %ld [",
1384+
Tell (TFormat ("Telnet (IAC) received: DO: %ld, DONT: %ld, WILL: %ld, WONT: %ld, SB: %ld",
13851385
m_nCount_IAC_DO,
13861386
m_nCount_IAC_DONT,
13871387
m_nCount_IAC_WILL,
13881388
m_nCount_IAC_WONT,
13891389
m_nCount_IAC_SB));
13901390

1391-
Hyperlink ("!!" DEBUG_PLUGIN_ID ":telnetlist()",
1392-
"Telnet", "Click to list telnet IAC items", "cyan", "", 0);
1393-
Note ("]");
1391+
if (m_nCount_IAC_DO || m_nCount_IAC_DONT || m_nCount_IAC_WILL || m_nCount_IAC_WONT)
1392+
{
1393+
Tell (" [");
1394+
Hyperlink ("!!" DEBUG_PLUGIN_ID ":telnetlist()",
1395+
"Telnet", "Click to list telnet IAC items", "cyan", "", 0);
1396+
Tell ("]");
1397+
}
1398+
1399+
Note ("");
13941400

13951401
ColourNote (SCRIPTERRORCONTEXTFORECOLOUR, "", "-- MXP --");
13961402

0 commit comments

Comments
 (0)