What does it do? Sendraw allows you to broadcast raw messages to the server, without having them prefixed by (Server Broadcast). It also allows you to impersonate other users. Permissions: sendraw - allows users to use /sendraw sendcolor - allows users to use /sendcolor* sendrgb - allows users to use /sendrgb* sendas - allows users to use /sendas Commands: /sendraw [message] - [message] is broadcast to the server as a normal message /sendcolor* [color] [message] - [message] is broadcast in the color specified. Valid colors are defined by the C# color table (official docs). Primary and secondary colors are all in there. /sendrgb* [R] [G] [B.] [message] - [message] is broadcast in text color defined by rgb values. /sendas [player name] [message] - [message] is broadcast to the server as though [player name] has said it, with the correct group color, prefix, and suffix To Do: Perhaps hardcode it so sendas can only be used by superadmins? Not sure. A command to replace /sendwhite and /sendred that allows you to choose from some basic colors A command to further customize the color by allowing you to choose the exact rgb for it. Allow you to use sendas using players who are not currently logged in (I think this may require looking at the database, not sure). Send a note to the log every time this command is used. Downloads: Latest version Source Code VS project (.zip) *You'll probably want to set up shortcommands for these commands with prefixes and whatnot, with individual permissions, rather than giving people permission to use this. June 12: updated to api 1.12. I will not be working on this anymore, other than committing drop-in code replacements that compile as-is. If you would like to take over development, contact me with your github username and I'll give you access to the repository. June 22: Fixed internal api version number
Done, but I'm keeping the multiple links for easy copy/paste (for myself and any others who require direct links for terminals). When I get home to VS, I'll set it up with git properly and unlink the files from my dropbox. If anyone else wants access to commits, ask (I'm incredibly lazy, and may not update the api myself).
Have added basic support for SendColor (recognizes the built-in colors) and SendRGB (for sending custom rgb colors, recommend you use shortcommands with this one). Will check for errors, etc at home, have no c# IDE here other than github's built-in editor (which is a nice change from notepad).
what if my server uses something different than a colon? like "guy: hi" would come up but i set the structure as "guy - says - hi"
I believe that's defined in the config file, in which case you need to recompile it with line 95 changed appropriately. Alternatively, you could just use sendrgb and specify the color manually with his name. I'll look and see if I can find the code that parses the config file and see how it works, but I won't have much time for the next couple of weeks. In the meantime, I can recompile it for you with that setting if you like, just let me know what your prefix is. I also have plans to add actions.
You can code it to use the config's stuff. Here's the psuedocode: PHP: args.Player.SendMessage(string.Format(Config.ChatFormat, ply.Group.Prefix, ply.Name, ply.Group.Suffix, message), ply.Group.R,ply.Group.B,ply.Group.G);args.Handled = true; return;
ok well one thing with /sendcolor and /sendrgb is that there is a slight space before it. my prefix is " - says - " including the spaces before and after the -
API updated to 1.12 (untested as I'm no longer actually running a server, but I didn't make any code changes and it compiled fine) I will not be developing this project anymore. If you would like to take over, tell me your github username and I'll add you to the repository (or fork it and give me a link, I'll post it up there). I will try to maintain the api version, but since I'm no longer running a server for myself, it may be a bit slow; send my username an email at efreakbnc.net if I miss one.
Hmm. I recompiled it with newer .DLLs. I'll look at it again in a few minutes. Edit: I forgot to update the internal api version. Doing that now. Edit2: Done. Try it now.
Ok so what if i changed the chat format structure? "ChatFormat": "[{1}] <{2}>{3} : {4}", How do I add in those?
Code: /sendcolor* [color] [message] - [message] is broadcast in the color specified. Valid colors are defined by the C# color table (official docs). Primary and secondary colors are all in there. /sendrgb* [R] [G] [B.] [message] - [message] is broadcast in text color defined by rgb values. You sir need to read the things in front of you; as to the other, it seems the idea here is to send a good global message, without adding 'broadcast' to the text, ie adding a prefix wouldn't do much for it.