<td class="host_col">
<!-- hostname -->
<?WHO:HOST("X")>
-<?!("COND:SUBST", 8, "WHO:REALHOST", "")> <br /><i> <?WHO:REALHOST("X")></i>
-<?!("X", 8)>
+<?!("WHO:REALHOST", 8)> <br /><i> <?WHO:REALHOST("X")></i><?!("X", 8)>
</td>
</tr>
</td>
<!-- idle flag -->
<td width="5%">
-<?!("COND:SUBST", 4, "WHO:IDLE")> <img align="middle" src="static/inactiveuser_24x.gif" alt="(<?_("idle since")>s <?WHO:IDLESINCE> <?_("Minutes")>)" border="0" /> <?!("X", 4)>
-<??("COND:SUBST", 5, "WHO:IDLE")> <img align="middle" src="static/activeuser_24x.gif" alt="(<?_("active")>)" border="0" /> <?!("X", 5)>
+<?!("WHO:IDLE", 4)> <img align="middle" src="static/inactiveuser_24x.gif" alt="(<?_("idle since")>s <?WHO:IDLESINCE> <?_("Minutes")>)" border="0" /> <?!("X", 4)>
+<??("WHO:IDLE", 5)> <img align="middle" src="static/activeuser_24x.gif" alt="(<?_("active")>)" border="0" /> <?!("X", 5)>
</td>
<td>
<!-- username (link to user bio/photo page) -->
<a href="showuser?who=<?WHO:NAME("U")>"> <?WHO:NAME("X")></a>
-<??("COND:SUBST", 6, "WHO:NSESSIONS", 1)>[<?WHO:NSESSIONS>] </a><?!("X", 6)>
+<??("WHO:NSESSIONS", 6, 0, 1)>[<?WHO:NSESSIONS>] </a><?!("X", 6)>
<!-- room -->
</td><td>
<?WHO:ROOM>
UserStateStruct *User = (UserStateStruct*) CTX;
StrBufAppendTemplate(Target, TP, User->RealHost, 0);
}
+int conditional_who_realhost(StrBuf *Target, WCTemplputParams *TP)
+{
+ UserStateStruct *User = (UserStateStruct*) CTX;
+ return StrLength(User->RealHost) > 0;
+}
void tmplput_who_lastactive(StrBuf *Target, WCTemplputParams *TP)
{
RegisterConditional(HKEY("WHO:NSESSIONS"), 1, conditional_who_nsessions, CTX_WHO);
RegisterConditional(HKEY("WHO:ISME"), 1, conditional_who_isme, CTX_WHO);
RegisterConditional(HKEY("WHO:REALROOM"), 1, conditional_who_realroom, CTX_WHO);
+ RegisterConditional(HKEY("WHO:REALHOST"), 1, conditional_who_realhost, CTX_WHO);
}