diff --git a/bin/auto b/bin/auto index a5d3614..0be2214 100755 --- a/bin/auto +++ b/bin/auto @@ -25,7 +25,8 @@ BEGIN { VER => 3, SVER => 0, REV => 0, - RSTAGE => 'd' + RSTAGE => 'd', + GR => substr(`cat $Bin/../.git/refs/heads/indev`, 0, 7) }; } use API::Std qw(conf_get err); diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 03300bd..bc111a4 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log 3.0 Indev ================================================================== + * Added Git revision to version string for dev releases. * Added an FML module for retrieving random FML quotes. * Privilege to use a command is now handled by the priv arg of cmd_add. diff --git a/src/Core/IRC.pm b/src/Core/IRC.pm index ad79b08..9e78498 100644 --- a/src/Core/IRC.pm +++ b/src/Core/IRC.pm @@ -17,7 +17,12 @@ sub version_reply my %src = usrc(substr($ex[0], 1)); if ($ex[3] eq ":\001VERSION\001") { - notice($svr, $src{nick}, "VERSION ".Auto::NAME." ".Auto::VER.".".Auto::SVER.".".Auto::REV.Auto::RSTAGE." ".$OSNAME); + if (Auto::RSTAGE ne 'd') { + notice($svr, $src{nick}, "VERSION ".Auto::NAME." ".Auto::VER.".".Auto::SVER.".".Auto::REV.Auto::RSTAGE." ".$OSNAME); + } + else { + notice($svr, $src{nick}, "VERSION ".Auto::NAME." ".Auto::VER.".".Auto::SVER.".".Auto::REV.Auto::RSTAGE."-".Auto::GR." ".$OSNAME); + } } return 1;