intermediate step to making commands case-sensitive (like they are in Lua)

This commit is contained in:
Glenn Maynard
2007-05-03 04:31:22 +00:00
parent f4c9f42cf1
commit eab788bcc2
+8 -1
View File
@@ -11,7 +11,14 @@ RString Command::GetName() const
if( m_vsArgs.empty() )
return RString();
RString s = m_vsArgs[0];
s.MakeLower();
TrimLeft( s );
TrimRight( s );
/* Transition hack: if a command begins with !, don't force it to lowercase. */
if( s.Left(1) == "!" )
s.erase( 0, 1 );
else
s.MakeLower();
return s;
}