To create new wiki account, please join us on #znc at freenode and ask admins to create a wiki account for you. You can say thanks to spambots for this inconvenience.

Difference between revisions of "ExpandString"

From ZNC
Jump to: navigation, search
(Added missing format strings, although two of the three may have been intentionally omitted.)
(Restore ExpandString from archive.org - 2016/06/06)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Some features (e.g. the [[perform]] and [[awaynick]] modules and the <code>CTCPReply</code> and (starting with version 0.090) <code>MOTD</code> [[Configuration|config options]]) support some variable-like strings. Here is a list of these:
+
Some features support variable-like strings.
  
{|
+
=Expand Strings=
 +
{| class="wikitable"
 
! Variable
 
! Variable
 
! Value
 
! Value
 +
! Sample output
 
|-
 
|-
 
| %user%
 
| %user%
| your user name
+
| the ZNC user name
|-
+
|
| %defnick%
 
| your default nick
 
 
|-
 
|-
 
| %nick%
 
| %nick%
 
| the current nick
 
| the current nick
 +
|
 +
|-
 +
| %defnick%
 +
| the default nick, as specified in the config
 +
|
 
|-
 
|-
 
| %altnick%
 
| %altnick%
| the alternate nick as specified in the config
+
| the alternate nick, as specified in the config
 +
|
 +
|-
 +
| %realname%
 +
| the realname, as specified in the config
 +
|
 
|-
 
|-
 
| %ident%
 
| %ident%
 
| the ident
 
| the ident
|-
+
|  
| %realname%
 
| the realname
 
 
|-
 
|-
 
| %vhost%
 
| %vhost%
 
| the current vhost
 
| the current vhost
 +
|
 
|-
 
|-
 
| %bindhost%
 
| %bindhost%
 
| the current bindhost
 
| the current bindhost
|-
+
|  
| %version%
 
| [[ZNC|ZNC's]] version string
 
 
|-
 
|-
 
| %time%
 
| %time%
 
| the current time (can be used for ''CTCP TIME'' replies)
 
| the current time (can be used for ''CTCP TIME'' replies)
 +
| Sat Oct 21 22:13:08 2006
 
|-
 
|-
 
| %uptime%
 
| %uptime%
| [[ZNC|ZNC's]] uptime
+
| the current uptime
 +
| 1w 2d 4h 20m 27s
 +
|-
 +
| %version%
 +
| ZNC's version string
 +
| 1.6.1+deb1
 
|-
 
|-
 
| %znc%
 
| %znc%
| replaced with ''All your IRC are belong to ZNC''
+
| (since [[ChangeLog/1.6.3|1.6.3]]) ZNC's name and website, optionally with version, <br/>depending on "Hide version" setting
|-
+
| ZNC - http://znc.in
| %random%
 
| replaced with ''42''
 
 
|}
 
|}
 +
 +
=Features that support expand strings=
 +
Expand strings can be used with many ZNC features. The following is a list of some features that accept expand strings.
 +
 +
; Modules
 +
* [[alias]]
 +
* [[autoattach]]
 +
* [[autoreply]]
 +
* [[awaynick]]
 +
* [[identfile]]
 +
* [[perform]]
 +
* [[watch]]
 +
; [[Configuration|Config Options]]
 +
* <code>CTCPReply</code>
 +
* <code>MOTD</code>
 +
* <code>QUITMSG</code>

Latest revision as of 13:25, 21 May 2017

Some features support variable-like strings.

Expand Strings[edit]

Variable Value Sample output
 %user% the ZNC user name
 %nick% the current nick
 %defnick% the default nick, as specified in the config
 %altnick% the alternate nick, as specified in the config
 %realname% the realname, as specified in the config
 %ident% the ident
 %vhost% the current vhost
 %bindhost% the current bindhost
 %time% the current time (can be used for CTCP TIME replies) Sat Oct 21 22:13:08 2006
 %uptime% the current uptime 1w 2d 4h 20m 27s
 %version% ZNC's version string 1.6.1+deb1
 %znc% (since 1.6.3) ZNC's name and website, optionally with version,
depending on "Hide version" setting
ZNC - http://znc.in

Features that support expand strings[edit]

Expand strings can be used with many ZNC features. The following is a list of some features that accept expand strings.

Modules
Config Options
  • CTCPReply
  • MOTD
  • QUITMSG