summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/MagicCarpet/coremessaging.lua
blob: 1677e8940efec2a51d2bc2617f074de76d217017 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
IniFile = cIniFile( "settings.ini" )
IniFile:ReadFile()
UsePrefixes = IniFile:GetValueSet( "Messaging", "Prefixes", "true" )
IniFile:WriteFile()

function SendMessage(a_Player, a_Message)
	if (UsePrefixes) then
		a_Player:SendMessage(cChatColor.Yellow .. "[INFO] " .. cChatColor.White .. a_Message)
	else
		a_Player:SendMessage(cChatColor.Yellow .. a_Message)
	end
end

function SendMessageSuccess(a_Player, a_Message)
	if (UsePrefixes) then
		a_Player:SendMessage(cChatColor.Green .. "[INFO] " .. cChatColor.White .. a_Message)
	else
		a_Player:SendMessage(cChatColor.Green .. a_Message)
	end
end

function SendMessageFailure(a_Player, a_Message)
	if (UsePrefixes) then
		a_Player:SendMessage(cChatColor.Red .. "[INFO] " .. cChatColor.White .. a_Message)
	else
		a_Player:SendMessage(cChatColor.Red .. a_Message)
	end
end