AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   ProChat (https://forums.alliedmods.net/showthread.php?t=84657)

MPNumB 01-29-2009 17:05

ProChat
 
5 Attachment(s)
Description:
This plugin changes chat colors to a bit more czero style. Also admins with "i" flag (by standard) can type /chatviewer to see all chat on the server (this command is enable/disable class). Also plugin automatically changes any colorchat edition (special configs thx to what your message can be colored), and blocks empty messages (space or % or colorchat cfg edition what are reformated to space).


Additional info:
Tested with amxmodx 1.8.1. Also uploaded "_noviewer" version for people who don't want admins to see all chat, but don't know how to disable this feature in source-code.


Notes:
Admin tag is disabled by standard. If you want to use it - enable it via source-code config.


Warnings:
Use only one of the plugins you find below!


Change-Log:

* 1.8
- Fixed: Random problems with admin tag.

* 1.7
- Fixed: Dead/alive scan in chat viewer had some problems (double-posts).

* 1.6
- Fixed: Chatviewer problem - not always showing chat.
- Fixed: Chatviewer problem - errorlog sometimes.
- Added: Chatviewer status saver if changing nick. Before it was automatically enabled on every admin who changes nick.

* 1.5
- Fixed: Problems with bots cuz client_infochanged forward was called with invalid player ID.
- Fixed: Problems with chatviewer when two players write the same message in the same time with the same status (dead or and team chat).
- Added: cfg: ability to enable admin tag in chat messages.
- Added: cfg: ability to enable admin tag in radio messages.
- Added: cfg: ability to change language settings for admin tag.
- Added: cfg: ability to enable admin tag view for all players (not only admins).
- Changed: Fixed standard HL bug. When recording a demo and later playing it - you don't always see names of people who wrote something in chat.

* 1.4
- Fixed: Crash saying something about WRITE_BYTE().

* 1.3
- Fixed: Errorlog on client_infochanged (cell number was 27 when should be 32).
- Fixed: Possible crash due to too big message length in write_string().

* 1.2
- Fixed: chat viewer wasn't working.
- Fixed: you didn't had to have special access to enable/disable chatviewer.
- Fixed: radio messages were not changed.
- Added: descriptive 'fire in the hole' in plugin.
- Added: config in source code.
- Added: cfg: ability to turn off chatviewer permanently.
- Added: cfg: ability to change chatviewer needed access level(s).
- Added: cfg: ability to turn of text change for radio messages.
- Added: cfg: ability to change language settings for dessriptive 'fire in the hole'.
- Changed: plugin uses less CPU.

* 1.1
- Fixed: max name length changed from 26 to 31.
- Changed: some things in the code to make plugin work better.

* 1.0
- First release.

bomnacama 01-29-2009 17:24

Re: ProChat
 
seems nice

AcidoX 01-30-2009 05:15

Re: ProChat
 
Does admin see dead, alive msg?

SchlumPF* 01-30-2009 05:27

Re: ProChat
 
check_flags(main_flags, flags_to_check, bool:adminflags=false)

i rather stay with

new flags = get_user_flags( plr );
if( flags & ADMIN_KICK && flags & ADMIN_BAN )

etc etc

M1R0n,M' 01-30-2009 08:04

Re: ProChat
 
Go0d Job Numb :)

MPNumB 01-30-2009 08:54

Re: ProChat
 
Quote:

Originally Posted by AcidoX (Post 752602)
Does admin see dead, alive msg?

Yes. Admins can see all chat.

Quote:

Originally Posted by SchlumPF* (Post 752607)
check_flags(main_flags, flags_to_check, bool:adminflags=false)

i rather stay with

new flags = get_user_flags( plr );
if( flags & ADMIN_KICK && flags & ADMIN_BAN )

etc etc

I made that function cuz of "cmdaccess.ini". With that function it supports more than one access flag per command.

Also specially for you I made this function as readable as show_activity stock's in amxmisc.inc. :D

xPaw 01-30-2009 09:01

Re: ProChat
 
nice color use with SOH & ETX :D

MPNumB 01-30-2009 09:09

Re: ProChat
 
Updated plugin a bit:

Just fixed my stock - made a bug when reformating it from my amxmisc edition to a stand-alone stock. Bug was with "y" access - returned opposed of what it should.

Arkshine 01-30-2009 11:05

Re: ProChat
 
- new iOldName[27], iNewName[27]; Should be 32.

- Instead of check_flags() function, If you want to test something like : get_user_flags(id) & ADMIN_KICK && get_user_flags(id) & ADMIN_BAN, should not be enough to do just : if ( !( get_user_flags( id ) & ~( ADMIN_KICK | ADMIN_BAN ) ) ) ? It would be better. [ Edit : Not sure if I understand well, I understood that you want to check if use has only theses flags and not checking if theses flags are contained )

- Why did you use client_command() when you can directly register via register_clmd() ? It would be better and it will avoid unnecessary calls.

- What's the purpose of get_chat_viewer_access() when the level is hardcoded ? Just do a #define so user will have to change just one line.

- Message_SayText() ; It would be more appropriate to try to do an effort to use severals switch instead of if() elseif()[..] , checking each time the string. Also, while+contain+replace = replace_all(), what's wrong with replace_all() ?

ConnorMcLeod 01-30-2009 11:15

Re: ProChat
 
Quote:

Originally Posted by arkshine (Post 752701)
what's wrong with replace_all() ?

It's too much readable for NumB.


All times are GMT -4. The time now is 19:49.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.