View Single Post
Hareide
New Member
Join Date: Mar 2006
Old 03-15-2006 , 16:50   (edited twice) Problems with the irc.sma (!needadmin)
Reply With Quote #17

This is kind of weird. Am running an hlds_l cstrike server with amxmodx. I compiled the plugins without warnings or errors. The script works with "/say !needadmin some text" in console, but if you use the default speak key "y" (binded to messagemode) to say "!needadmin some text" then the plugin returns "[NeedAdmin] No message specified. Please use !needadmin followed by a message!")". I didn’t know that there was a different between them.

Am I the only one with this "problem"? I guess it would be pretty simple for someone who knows how to script, to add "messagemode and teamspeak" to this nice plugin?

EDIT:
is it as simple as to edit:
// Commands
register_clcmd("say","irc_saytext")
register_clcmd("say_team","irc_saytext")
to:
// Commands
register_clcmd("say","irc_saytext")
register_clcmd("say_team","irc_saytext")
register_clcmd("messagemode","irc_saytext")
register_clcmd("messagemode2","irc_saytext")

I guess not, but I have not done any scripting so .. You tell me

EDIT2:
I'm using amxmodx 1.70 with Metamod v1.19p28 on a dedicated hlds_l linux server.

Code:
if(strlen(newmsg) >= 2)
	{
	get_cvar_string("irc_msg_srvsay",tmsg,1024)
	parsemessage(id,tmsg,temp,newmsg)
	format(temp,1024,"PRIVMSG %s :%s^r^n",chan,temp)
	additem(temp)
	client_print(id,print_chat,"[NeedAdmin] Message sent to admins on irc. Repeating/Abuse will lead to ban!")
	return PLUGIN_HANDLED
	}
	else
	{
	client_print(id,print_chat,"[NeedAdmin] No message specified. Please use !needadmin followed by a message!")
                return PLUGIN_HANDLED
	}
See that AmxmodX 1.70 has "Scripting Changes"
http://wiki.tcwonline.org/index.php/...ipting_Changes )

it seems that the plugin fails in the very end of the irc.sma code (the start in the cut section):
Code:
if(strlen(newmsg) >= 2)
It seems that the "/say command" returns the string with more or equal sentensens to '2', but when you use "y" binded to "messagemode" (default in hlds/cstrike) then this suddenly isn't true, and the script jumps to the "else" function that displays "[NeedAdmin] No message specified. Please use !needadmin followed by a message!"

I find it strange that the script handles the to way's to talk different. I thought "messagemode" used "say". Again am I the only one with newest amxmodx and metamod-p that has this problem or not?
Hareide is offline