Diff
checker
टेक्स्ट
टेक्स्ट
छवियां
दस्तावेज़
Excel
फ़ोल्डर्स
Legal
Enterprise
डेस्कटॉप
मूल्य
साइन इन करें
Diffchecker डेस्कटॉप डाउनलोड करें
टेक्स्ट की तुलना करें
दो टेक्स्ट फ़ाइलों के बीच अंतर ढूंढें
उपकरण
इतिहास
रियल-टाइम एडिटर
रिक्त स्थान छिपाएँ
अपरिवर्तित संक्षिप्त करें
लाइन रैप बंद
लेआउट
विभाजित
संयुक्त
परिवर्तन हाइलाइट करें
स्मार्ट
शब्द
अक्षर
टेक्स्ट शैलियां
दिखावट बदलें
सिंटैक्स हाइलाइटिंग
सिंटैक्स चुनें
अनदेखा करें
टेक्स्ट बदलें
पहले अंतर पर जाएँ
इनपुट संपादित करें
Diffchecker Desktop
Diffchecker चलाने का सबसे सुरक्षित तरीका। Diffchecker Desktop ऐप पाएं: आपके diffs कभी आपके कंप्यूटर से बाहर नहीं जाते!
Desktop पाएं
Untitled diff
बनाया गया
8 वर्ष पहले
Diff कभी समाप्त नहीं होता
साफ़
निर्यात करें
शेयर करें
समझाएं
3 हटाए गए
लाइनें
कुल
हटाया गया
अक्षर
कुल
हटाया गया
इस सुविधा का उपयोग जारी रखने के लिए, अपग्रेड करें
Diff
checker
Pro
मूल्य देखें
210 लाइनें
सभी को कॉपी करें
11 जोड़े गए
लाइनें
कुल
जोड़ा गया
अक्षर
कुल
जोड़ा गया
इस सुविधा का उपयोग जारी रखने के लिए, अपग्रेड करें
Diff
checker
Pro
मूल्य देखें
215 लाइनें
सभी को कॉपी करें
/*
/*
----------------------------------------------------------------
----------------------------------------------------------------
Plugin : SaveChat
Plugin : SaveChat
Author : citkabuto
Author : citkabuto
Game : Any Source game
Game : Any Source game
Description : Will record all player messages to a file
Description : Will record all player messages to a file
================================================================
================================================================
Date Version Description
Date Version Description
================================================================
================================================================
23/Feb/10 1.2.1 - Fixed bug with player team id
23/Feb/10 1.2.1 - Fixed bug with player team id
15/Feb/10 1.2.0 - Now records team name when using cvar
15/Feb/10 1.2.0 - Now records team name when using cvar
sm_record_detail
sm_record_detail
01/Feb/10 1.1.1 - Fixed bug to prevent errors when using
01/Feb/10 1.1.1 - Fixed bug to prevent errors when using
HLSW (client index 0 is invalid)
HLSW (client index 0 is invalid)
31/Jan/10 1.1.0 - Fixed date format on filename
31/Jan/10 1.1.0 - Fixed date format on filename
Added ability to record player info
Added ability to record player info
when connecting using cvar:
when connecting using cvar:
sm_record_detail (0=none,1=all:def:1)
sm_record_detail (0=none,1=all:def:1)
28/Jan/10 1.0.0 - Initial Version
28/Jan/10 1.0.0 - Initial Version
----------------------------------------------------------------
----------------------------------------------------------------
*/
*/
#include <sourcemod>
#include <sourcemod>
#include <sdktools>
#include <sdktools>
#include <geoip.inc>
#include <geoip.inc>
#include <string.inc>
#include <string.inc>
#define PLUGIN_VERSION "SaveChat_1.2.1"
#define PLUGIN_VERSION "SaveChat_1.2.1"
static String:chatFile[128]
static String:chatFile[128]
new Handle:fileHandle = INVALID_HANDLE
new Handle:fileHandle = INVALID_HANDLE
new Handle:sc_record_detail = INVALID_HANDLE
new Handle:sc_record_detail = INVALID_HANDLE
public Plugin:myinfo =
public Plugin:myinfo =
{
{
name = "SaveChat",
name = "SaveChat",
author = "citkabuto",
author = "citkabuto",
description = "Records player chat messages to a file",
description = "Records player chat messages to a file",
version = PLUGIN_VERSION,
version = PLUGIN_VERSION,
url = "http://forums.alliedmods.net/showthread.php?t=117116"
url = "http://forums.alliedmods.net/showthread.php?t=117116"
}
}
public OnPluginStart()
public OnPluginStart()
{
{
new String:date[21]
new String:date[21]
new String:logFile[100]
new String:logFile[100]
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
new port
/* Register CVars */
/* Register CVars */
CreateConVar("sm_savechat_version", PLUGIN_VERSION, "Save Player Chat Messages Plugin",
CreateConVar("sm_savechat_version", PLUGIN_VERSION, "Save Player Chat Messages Plugin",
FCVAR_PLUGIN|FCVAR_DONTRECORD|FCVAR_REPLICATED)
FCVAR_PLUGIN|FCVAR_DONTRECORD|FCVAR_REPLICATED)
sc_record_detail = CreateConVar("sc_record_detail", "1",
sc_record_detail = CreateConVar("sc_record_detail", "1",
"Record player Steam ID and IP address",
"Record player Steam ID and IP address",
FCVAR_PLUGIN)
FCVAR_PLUGIN)
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
port = GetConVarInt(FindConVar("hostport"));
/* Say commands */
/* Say commands */
RegConsoleCmd("say", Command_Say)
RegConsoleCmd("say", Command_Say)
RegConsoleCmd("say_team", Command_SayTeam)
RegConsoleCmd("say_team", Command_SayTeam)
/* Format date for log filename */
/* Format date for log filename */
FormatTime(date, sizeof(date), "%d%m%y", -1)
FormatTime(date, sizeof(date), "%d%m%y", -1)
/* Create name of logfile to use */
/* Create name of logfile to use */
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
Format(logFile, sizeof(logFile), "/logs/chat%s
.log", date
)
Format(logFile, sizeof(logFile), "/logs/chat%s
-%s
.log", date
, port
)
BuildPath(Path_SM, chatFile, PLATFORM_MAX_PATH, logFile)
BuildPath(Path_SM, chatFile, PLATFORM_MAX_PATH, logFile)
}
}
/*
/*
* Capture player chat and record to file
* Capture player chat and record to file
*/
*/
public Action:Command_Say(client, args)
public Action:Command_Say(client, args)
{
{
LogChat(client, args, false)
LogChat(client, args, false)
return Plugin_Continue
return Plugin_Continue
}
}
/*
/*
* Capture player team chat and record to file
* Capture player team chat and record to file
*/
*/
public Action:Command_SayTeam(client, args)
public Action:Command_SayTeam(client, args)
{
{
LogChat(client, args, true)
LogChat(client, args, true)
return Plugin_Continue
return Plugin_Continue
}
}
public OnClientPostAdminCheck(client)
public OnClientPostAdminCheck(client)
{
{
/* Only record player detail if CVAR set */
/* Only record player detail if CVAR set */
if(GetConVarInt(sc_record_detail) != 1)
if(GetConVarInt(sc_record_detail) != 1)
return
return
if(IsFakeClient(client))
if(IsFakeClient(client))
return
return
new String:msg[2048]
new String:msg[2048]
new String:time[21]
new String:time[21]
new String:country[3]
new String:country[3]
new String:steamID[128]
new String:steamID[128]
new String:playerIP[50]
new String:playerIP[50]
GetClientAuthString(client, steamID, sizeof(steamID))
GetClientAuthString(client, steamID, sizeof(steamID))
/* Get 2 digit country code for current player */
/* Get 2 digit country code for current player */
if(GetClientIP(client, playerIP, sizeof(playerIP), true) == false) {
if(GetClientIP(client, playerIP, sizeof(playerIP), true) == false) {
country = " "
country = " "
} else {
} else {
if(GeoipCode2(playerIP, country) == false) {
if(GeoipCode2(playerIP, country) == false) {
country = " "
country = " "
}
}
}
}
FormatTime(time, sizeof(time), "%H:%M:%S", -1)
FormatTime(time, sizeof(time), "%H:%M:%S", -1)
Format(msg, sizeof(msg), "[%s] [%s] %-35N has joined (%s | %s)",
Format(msg, sizeof(msg), "[%s] [%s] %-35N has joined (%s | %s)",
time,
time,
country,
country,
client,
client,
steamID,
steamID,
playerIP)
playerIP)
SaveMessage(msg)
SaveMessage(msg)
}
}
/*
/*
* Extract all relevant information and format
* Extract all relevant information and format
*/
*/
public LogChat(client, args, bool:teamchat)
public LogChat(client, args, bool:teamchat)
{
{
new String:msg[2048]
new String:msg[2048]
new String:time[21]
new String:time[21]
new String:text[1024]
new String:text[1024]
new String:country[3]
new String:country[3]
new String:playerIP[50]
new String:playerIP[50]
new String:teamName[20]
new String:teamName[20]
GetCmdArgString(text, sizeof(text))
GetCmdArgString(text, sizeof(text))
StripQuotes(text)
StripQuotes(text)
if(client == 0) {
if(client == 0) {
/* Don't try and obtain client country/team if this is a console message */
/* Don't try and obtain client country/team if this is a console message */
Format(country, sizeof(country), " ")
Format(country, sizeof(country), " ")
Format(teamName, sizeof(teamName), "")
Format(teamName, sizeof(teamName), "")
} else {
} else {
/* Get 2 digit country code for current player */
/* Get 2 digit country code for current player */
if(GetClientIP(client, playerIP, sizeof(playerIP), true) == false) {
if(GetClientIP(client, playerIP, sizeof(playerIP), true) == false) {
country = " "
country = " "
} else {
} else {
if(GeoipCode2(playerIP, country) == false) {
if(GeoipCode2(playerIP, country) == false) {
country = " "
country = " "
}
}
}
}
GetTeamName(GetClientTeam(client), teamName, sizeof(teamName))
GetTeamName(GetClientTeam(client), teamName, sizeof(teamName))
}
}
FormatTime(time, sizeof(time), "%H:%M:%S", -1)
FormatTime(time, sizeof(time), "%H:%M:%S", -1)
if(GetConVarInt(sc_record_detail) == 1) {
if(GetConVarInt(sc_record_detail) == 1) {
Format(msg, sizeof(msg), "[%s] [%s] [%-11s] %-35N :%s %s",
Format(msg, sizeof(msg), "[%s] [%s] [%-11s] %-35N :%s %s",
time,
time,
country,
country,
teamName,
teamName,
client,
client,
teamchat == true ? " (TEAM)" : "",
teamchat == true ? " (TEAM)" : "",
text)
text)
} else {
} else {
Format(msg, sizeof(msg), "[%s] [%s] %-35N :%s %s",
Format(msg, sizeof(msg), "[%s] [%s] %-35N :%s %s",
time,
time,
country,
country,
client,
client,
teamchat == true ? " (TEAM)" : "",
teamchat == true ? " (TEAM)" : "",
text)
text)
}
}
SaveMessage(msg)
SaveMessage(msg)
}
}
/*
/*
* Log a map transition
* Log a map transition
*/
*/
public OnMapStart(){
public OnMapStart(){
new String:map[128]
new String:map[128]
new String:msg[1024]
new String:msg[1024]
new String:date[21]
new String:date[21]
new String:time[21]
new String:time[21]
new String:logFile[100]
new String:logFile[100]
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
new port
GetCurrentMap(map, sizeof(map))
GetCurrentMap(map, sizeof(map))
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
port = GetConVarInt(FindConVar("hostport"));
/* The date may have rolled over, so update the logfile name here */
/* The date may have rolled over, so update the logfile name here */
FormatTime(date, sizeof(date), "%d%m%y", -1)
FormatTime(date, sizeof(date), "%d%m%y", -1)
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
Format(logFile, sizeof(logFile), "/logs/chat%s
.log", date
)
Format(logFile, sizeof(logFile), "/logs/chat%s
-%s
.log", date
, port)
BuildPath(Path_SM, chatFile, PLATFORM_MAX_PATH, logFile)
BuildPath(Path_SM, chatFile, PLATFORM_MAX_PATH, logFile)
FormatTime(time, sizeof(time), "%d/%m/%Y %H:%M:%S", -1)
FormatTime(time, sizeof(time), "%d/%m/%Y %H:%M:%S", -1)
Format(msg, sizeof(msg), "[%s] --- NEW MAP STARTED: %s ---", time, map)
Format(msg, sizeof(msg), "[%s] --- NEW MAP STARTED: %s ---", time, map)
SaveMessage("--=================================================================--")
SaveMessage("--=================================================================--")
SaveMessage(msg)
SaveMessage(msg)
SaveMessage("--=================================================================--")
SaveMessage("--=================================================================--")
}
}
/*
/*
* Log the message to file
* Log the message to file
*/
*/
public SaveMessage(const String:message[])
public SaveMessage(const String:message[])
{
{
fileHandle = OpenFile(chatFile, "a") /* Append */
fileHandle = OpenFile(chatFile, "a") /* Append */
WriteFileLine(fileHandle, message)
WriteFileLine(fileHandle, message)
CloseHandle(fileHandle)
CloseHandle(fileHandle)
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
सेव किए गए Diffs
ऑरिजनल टेक्स्ट
फ़ाइल खोलें
/* ---------------------------------------------------------------- Plugin : SaveChat Author : citkabuto Game : Any Source game Description : Will record all player messages to a file ================================================================ Date Version Description ================================================================ 23/Feb/10 1.2.1 - Fixed bug with player team id 15/Feb/10 1.2.0 - Now records team name when using cvar sm_record_detail 01/Feb/10 1.1.1 - Fixed bug to prevent errors when using HLSW (client index 0 is invalid) 31/Jan/10 1.1.0 - Fixed date format on filename Added ability to record player info when connecting using cvar: sm_record_detail (0=none,1=all:def:1) 28/Jan/10 1.0.0 - Initial Version ---------------------------------------------------------------- */ #include <sourcemod> #include <sdktools> #include <geoip.inc> #include <string.inc> #define PLUGIN_VERSION "SaveChat_1.2.1" static String:chatFile[128] new Handle:fileHandle = INVALID_HANDLE new Handle:sc_record_detail = INVALID_HANDLE public Plugin:myinfo = { name = "SaveChat", author = "citkabuto", description = "Records player chat messages to a file", version = PLUGIN_VERSION, url = "http://forums.alliedmods.net/showthread.php?t=117116" } public OnPluginStart() { new String:date[21] new String:logFile[100] /* Register CVars */ CreateConVar("sm_savechat_version", PLUGIN_VERSION, "Save Player Chat Messages Plugin", FCVAR_PLUGIN|FCVAR_DONTRECORD|FCVAR_REPLICATED) sc_record_detail = CreateConVar("sc_record_detail", "1", "Record player Steam ID and IP address", FCVAR_PLUGIN) /* Say commands */ RegConsoleCmd("say", Command_Say) RegConsoleCmd("say_team", Command_SayTeam) /* Format date for log filename */ FormatTime(date, sizeof(date), "%d%m%y", -1) /* Create name of logfile to use */ Format(logFile, sizeof(logFile), "/logs/chat%s.log", date) BuildPath(Path_SM, chatFile, PLATFORM_MAX_PATH, logFile) } /* * Capture player chat and record to file */ public Action:Command_Say(client, args) { LogChat(client, args, false) return Plugin_Continue } /* * Capture player team chat and record to file */ public Action:Command_SayTeam(client, args) { LogChat(client, args, true) return Plugin_Continue } public OnClientPostAdminCheck(client) { /* Only record player detail if CVAR set */ if(GetConVarInt(sc_record_detail) != 1) return if(IsFakeClient(client)) return new String:msg[2048] new String:time[21] new String:country[3] new String:steamID[128] new String:playerIP[50] GetClientAuthString(client, steamID, sizeof(steamID)) /* Get 2 digit country code for current player */ if(GetClientIP(client, playerIP, sizeof(playerIP), true) == false) { country = " " } else { if(GeoipCode2(playerIP, country) == false) { country = " " } } FormatTime(time, sizeof(time), "%H:%M:%S", -1) Format(msg, sizeof(msg), "[%s] [%s] %-35N has joined (%s | %s)", time, country, client, steamID, playerIP) SaveMessage(msg) } /* * Extract all relevant information and format */ public LogChat(client, args, bool:teamchat) { new String:msg[2048] new String:time[21] new String:text[1024] new String:country[3] new String:playerIP[50] new String:teamName[20] GetCmdArgString(text, sizeof(text)) StripQuotes(text) if(client == 0) { /* Don't try and obtain client country/team if this is a console message */ Format(country, sizeof(country), " ") Format(teamName, sizeof(teamName), "") } else { /* Get 2 digit country code for current player */ if(GetClientIP(client, playerIP, sizeof(playerIP), true) == false) { country = " " } else { if(GeoipCode2(playerIP, country) == false) { country = " " } } GetTeamName(GetClientTeam(client), teamName, sizeof(teamName)) } FormatTime(time, sizeof(time), "%H:%M:%S", -1) if(GetConVarInt(sc_record_detail) == 1) { Format(msg, sizeof(msg), "[%s] [%s] [%-11s] %-35N :%s %s", time, country, teamName, client, teamchat == true ? " (TEAM)" : "", text) } else { Format(msg, sizeof(msg), "[%s] [%s] %-35N :%s %s", time, country, client, teamchat == true ? " (TEAM)" : "", text) } SaveMessage(msg) } /* * Log a map transition */ public OnMapStart(){ new String:map[128] new String:msg[1024] new String:date[21] new String:time[21] new String:logFile[100] GetCurrentMap(map, sizeof(map)) /* The date may have rolled over, so update the logfile name here */ FormatTime(date, sizeof(date), "%d%m%y", -1) Format(logFile, sizeof(logFile), "/logs/chat%s.log", date) BuildPath(Path_SM, chatFile, PLATFORM_MAX_PATH, logFile) FormatTime(time, sizeof(time), "%d/%m/%Y %H:%M:%S", -1) Format(msg, sizeof(msg), "[%s] --- NEW MAP STARTED: %s ---", time, map) SaveMessage("--=================================================================--") SaveMessage(msg) SaveMessage("--=================================================================--") } /* * Log the message to file */ public SaveMessage(const String:message[]) { fileHandle = OpenFile(chatFile, "a") /* Append */ WriteFileLine(fileHandle, message) CloseHandle(fileHandle) }
परिवर्तित टेक्स्ट
फ़ाइल खोलें
/* ---------------------------------------------------------------- Plugin : SaveChat Author : citkabuto Game : Any Source game Description : Will record all player messages to a file ================================================================ Date Version Description ================================================================ 23/Feb/10 1.2.1 - Fixed bug with player team id 15/Feb/10 1.2.0 - Now records team name when using cvar sm_record_detail 01/Feb/10 1.1.1 - Fixed bug to prevent errors when using HLSW (client index 0 is invalid) 31/Jan/10 1.1.0 - Fixed date format on filename Added ability to record player info when connecting using cvar: sm_record_detail (0=none,1=all:def:1) 28/Jan/10 1.0.0 - Initial Version ---------------------------------------------------------------- */ #include <sourcemod> #include <sdktools> #include <geoip.inc> #include <string.inc> #define PLUGIN_VERSION "SaveChat_1.2.1" static String:chatFile[128] new Handle:fileHandle = INVALID_HANDLE new Handle:sc_record_detail = INVALID_HANDLE public Plugin:myinfo = { name = "SaveChat", author = "citkabuto", description = "Records player chat messages to a file", version = PLUGIN_VERSION, url = "http://forums.alliedmods.net/showthread.php?t=117116" } public OnPluginStart() { new String:date[21] new String:logFile[100] new port /* Register CVars */ CreateConVar("sm_savechat_version", PLUGIN_VERSION, "Save Player Chat Messages Plugin", FCVAR_PLUGIN|FCVAR_DONTRECORD|FCVAR_REPLICATED) sc_record_detail = CreateConVar("sc_record_detail", "1", "Record player Steam ID and IP address", FCVAR_PLUGIN) port = GetConVarInt(FindConVar("hostport")); /* Say commands */ RegConsoleCmd("say", Command_Say) RegConsoleCmd("say_team", Command_SayTeam) /* Format date for log filename */ FormatTime(date, sizeof(date), "%d%m%y", -1) /* Create name of logfile to use */ Format(logFile, sizeof(logFile), "/logs/chat%s-%s.log", date, port) BuildPath(Path_SM, chatFile, PLATFORM_MAX_PATH, logFile) } /* * Capture player chat and record to file */ public Action:Command_Say(client, args) { LogChat(client, args, false) return Plugin_Continue } /* * Capture player team chat and record to file */ public Action:Command_SayTeam(client, args) { LogChat(client, args, true) return Plugin_Continue } public OnClientPostAdminCheck(client) { /* Only record player detail if CVAR set */ if(GetConVarInt(sc_record_detail) != 1) return if(IsFakeClient(client)) return new String:msg[2048] new String:time[21] new String:country[3] new String:steamID[128] new String:playerIP[50] GetClientAuthString(client, steamID, sizeof(steamID)) /* Get 2 digit country code for current player */ if(GetClientIP(client, playerIP, sizeof(playerIP), true) == false) { country = " " } else { if(GeoipCode2(playerIP, country) == false) { country = " " } } FormatTime(time, sizeof(time), "%H:%M:%S", -1) Format(msg, sizeof(msg), "[%s] [%s] %-35N has joined (%s | %s)", time, country, client, steamID, playerIP) SaveMessage(msg) } /* * Extract all relevant information and format */ public LogChat(client, args, bool:teamchat) { new String:msg[2048] new String:time[21] new String:text[1024] new String:country[3] new String:playerIP[50] new String:teamName[20] GetCmdArgString(text, sizeof(text)) StripQuotes(text) if(client == 0) { /* Don't try and obtain client country/team if this is a console message */ Format(country, sizeof(country), " ") Format(teamName, sizeof(teamName), "") } else { /* Get 2 digit country code for current player */ if(GetClientIP(client, playerIP, sizeof(playerIP), true) == false) { country = " " } else { if(GeoipCode2(playerIP, country) == false) { country = " " } } GetTeamName(GetClientTeam(client), teamName, sizeof(teamName)) } FormatTime(time, sizeof(time), "%H:%M:%S", -1) if(GetConVarInt(sc_record_detail) == 1) { Format(msg, sizeof(msg), "[%s] [%s] [%-11s] %-35N :%s %s", time, country, teamName, client, teamchat == true ? " (TEAM)" : "", text) } else { Format(msg, sizeof(msg), "[%s] [%s] %-35N :%s %s", time, country, client, teamchat == true ? " (TEAM)" : "", text) } SaveMessage(msg) } /* * Log a map transition */ public OnMapStart(){ new String:map[128] new String:msg[1024] new String:date[21] new String:time[21] new String:logFile[100] new port GetCurrentMap(map, sizeof(map)) port = GetConVarInt(FindConVar("hostport")); /* The date may have rolled over, so update the logfile name here */ FormatTime(date, sizeof(date), "%d%m%y", -1) Format(logFile, sizeof(logFile), "/logs/chat%s-%s.log", date, port) BuildPath(Path_SM, chatFile, PLATFORM_MAX_PATH, logFile) FormatTime(time, sizeof(time), "%d/%m/%Y %H:%M:%S", -1) Format(msg, sizeof(msg), "[%s] --- NEW MAP STARTED: %s ---", time, map) SaveMessage("--=================================================================--") SaveMessage(msg) SaveMessage("--=================================================================--") } /* * Log the message to file */ public SaveMessage(const String:message[]) { fileHandle = OpenFile(chatFile, "a") /* Append */ WriteFileLine(fileHandle, message) CloseHandle(fileHandle) }
अंतर खोजें