mIRC Homepage

Add $ircdversion = ircd-ratbox-3.0.10(20160113_12-

Posted By: Raccoon

Add $ircdversion = ircd-ratbox-3.0.10(20160113_12- - 05/09/21 04:22 PM

Request for an identifier $ircdversion

Examples:
Code
$ircdversion == ircd-ratbox-3.0.10(20160113_12-29315)
$ircdversion == UnrealIRCd-5.2.2-git
$ircdversion == charybdis-3.5.6-074e23e(20181121-074e23e)

Usage:
Code
  if     (ircd-ratbox-3.* iswm $ircdversion) { do stuff }
  elseif (charybdis-3.*   iswm $ircdversion) { do stuff }
  elseif (ircd-ratbox-*   iswm $ircdversion) { do stuff }
  elseif (UnrealIRCd-*    iswm $ircdversion) { do stuff }
  else { do stuff }
Posted By: damian

Re: Add $ircdversion = ircd-ratbox-3.0.10(20160113_12- - 06/09/21 12:16 PM

I made this for you, I hope it helps. Remember that this relies complete on the IRCd sending you the information and conforming to RFC.

Code
raw 2:*:{ set -e $+(%, ircdv., $cid) $8 }
alias ircdv {
  return $eval($+(%, ircdv., $cid), 2)
}


It's pretty simple. The RAW will get the version from the initial notice when you join the network and store it against the connection identifier. When you use $ircdv it will return the value on the server you're on like any other script.

Usage:

Code
on *:TEXT:!checkircdv:?:{
  if (ircd-ratbox-3.* iswm $ircdv) { .notice $nick Woah! This is RATBOX3!!! }
}


.. or as an alias

Code
alias checkircdv {
  if (UnrealIRCd-* iswm $ircdv) { echo -a .. We have UnrealIRCd! Uhoh. }
}


Good luck!
© 2021 mIRC Discussion Forums