-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from jprzimba/player-statements
[FATURE] Log Players Statements
- Loading branch information
Showing
10 changed files
with
57 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,16 @@ | ||
function onUpdateDatabase() | ||
logger.info("Updating database to version 47 (hireling)") | ||
logger.info("Updating database to version 47 (player statements)") | ||
|
||
db.query([[ | ||
CREATE TABLE IF NOT EXISTS `player_hirelings` ( | ||
`id` INT NOT NULL PRIMARY KEY auto_increment, | ||
`player_id` INT NOT NULL, | ||
`name` varchar(255), | ||
`active` tinyint unsigned NOT NULL DEFAULT '0', | ||
`sex` tinyint unsigned NOT NULL DEFAULT '0', | ||
`posx` int(11) NOT NULL DEFAULT '0', | ||
`posy` int(11) NOT NULL DEFAULT '0', | ||
`posz` int(11) NOT NULL DEFAULT '0', | ||
`lookbody` int(11) NOT NULL DEFAULT '0', | ||
`lookfeet` int(11) NOT NULL DEFAULT '0', | ||
`lookhead` int(11) NOT NULL DEFAULT '0', | ||
`looklegs` int(11) NOT NULL DEFAULT '0', | ||
`looktype` int(11) NOT NULL DEFAULT '136', | ||
FOREIGN KEY(`player_id`) REFERENCES `players`(`id`) | ||
ON DELETE CASCADE | ||
) | ||
CREATE TABLE IF NOT EXISTS `player_statements`( | ||
`id` INT NOT NULL AUTO_INCREMENT, | ||
`player_id` INT NOT NULL, | ||
`receiver` TEXT NOT NULL, | ||
`channel_id` INT NOT NULL DEFAULT 0, | ||
`text` VARCHAR (255) NOT NULL, | ||
`date` BIGINT NOT NULL DEFAULT 0, | ||
PRIMARY KEY (`id`), KEY (`player_id`), KEY (`channel_id`), | ||
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
]]) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters