aboutsummaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorclick <none@none>2010-12-02 03:54:52 +0100
committerclick <none@none>2010-12-02 03:54:52 +0100
commitbc098658c6a6b1611ff881dd21ab113540d37935 (patch)
tree36d75973a8e61d78df426d7d1178184a736d9c96 /sql
parent0c44bd33ee7b42c924859139a9f4b04cf2b91261 (diff)
Core/Chat: Configure automatic owner declaration for custom chat channels (patch by leak)
Closes issue 4974. --HG-- branch : trunk
Diffstat (limited to 'sql')
-rw-r--r--sql/base/characters_database.sql12
-rw-r--r--sql/base/world_database.sql5
-rw-r--r--sql/updates/10548_characters_channel.sql8
-rw-r--r--sql/updates/10548_world_command.sql5
-rw-r--r--sql/updates/10548_world_trinity_string.sql4
5 files changed, 26 insertions, 8 deletions
diff --git a/sql/base/characters_database.sql b/sql/base/characters_database.sql
index 96a59021971..3753593e694 100644
--- a/sql/base/characters_database.sql
+++ b/sql/base/characters_database.sql
@@ -238,14 +238,14 @@ DROP TABLE IF EXISTS `channels`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `channels` (
- `m_name` text NOT NULL,
+ `m_name` varchar(128) NOT NULL,
`m_team` int(10) unsigned NOT NULL,
- `m_announce` tinyint(1) unsigned NOT NULL default '0',
- `m_moderate` tinyint(1) unsigned NOT NULL default '0',
- `m_public` tinyint(1) unsigned NOT NULL default '1',
- `m_password` text,
+ `m_announce` tinyint(3) unsigned NOT NULL default '1',
+ `m_ownership` tinyint(3) unsigned NOT NULL default '1',
+ `m_password` varchar(32) NULL,
`BannedList` longtext,
- PRIMARY KEY (`m_name`(10),`m_team`)
+ `last_used` INT(10) UNSIGNED NOT NULL,
+ PRIMARY KEY (`m_name`,`m_team`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Channel System';
/*!40101 SET character_set_client = @saved_cs_client */;
diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql
index 7e0a4e0cc45..94079a37c6d 100644
--- a/sql/base/world_database.sql
+++ b/sql/base/world_database.sql
@@ -366,6 +366,7 @@ INSERT INTO `command` VALUES
('character titles',2,'Syntax: .character titles [$player_name]\r\n\r\nShow known titles list for selected player or player find by $player_name.'),
('character changefaction',2,'Syntax: .character changefaction $name\r\n\r\nChange character faction.'),
('character changerace',2,'Syntax: .character changerace $name\r\n\r\nChange character race.'),
+('channel set ownership', 3, 'Syntax: .channel set ownership $channel [on/off]\n\n\Grant ownership to the first person that joins the channel.'),
('channel set public', 3, 'Syntax: .channel set public $channel $public\r\n\r\nChange password-changing ability for a channel. 1 for possible, 0 for GM only.'),
('combatstop',2,'Syntax: .combatstop [$playername]\r\nStop combat for selected character. If selected non-player then command applied to self. If $playername provided then attempt applied to online player $playername.'),
('cometome',3,'SYntax: .cometome $parameter\nMake selected creature come to your current location (new position not saved to DB).'),
@@ -27744,8 +27745,8 @@ INSERT INTO `trinity_string` (`entry`,`content_default`,`content_loc1`,`content_
(5019, '[Mountable]', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(5020, 'Phasemask: %u', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(5021, 'Armor: %u', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
-(5022, 'Channel password not changed due to channel being marked public. GM Powers required.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
-(5023, 'Channel: %s publicity set to: %u', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+(5022, 'Granting ownership to first person that joins the channel \"%s\": Enabled.'),
+(5023, 'Granting ownership to first person that joins the channel \"%s\": Disabled.'),
(5024, 'Entry: %u', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(5025, 'Type: %u', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(5026, 'DisplayID: %u', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
diff --git a/sql/updates/10548_characters_channel.sql b/sql/updates/10548_characters_channel.sql
new file mode 100644
index 00000000000..905d3583e4a
--- /dev/null
+++ b/sql/updates/10548_characters_channel.sql
@@ -0,0 +1,8 @@
+ALTER TABLE `channels`
+DROP COLUMN `m_moderate`,
+CHANGE `m_name` `m_name` VARCHAR(128) NOT NULL,
+CHANGE `m_announce` `m_announce` TINYINT(3) UNSIGNED DEFAULT '1' NOT NULL,
+CHANGE `m_public` `m_ownership` TINYINT(3) UNSIGNED DEFAULT '1' NOT NULL,
+CHANGE `m_password` `m_password` VARCHAR(32) NULL,
+ADD COLUMN `last_used` INT(10) UNSIGNED NOT NULL AFTER `BannedList`;
+SET last_used = UNIX_TIMESTAMP();
diff --git a/sql/updates/10548_world_command.sql b/sql/updates/10548_world_command.sql
new file mode 100644
index 00000000000..8ea3ddbbc9e
--- /dev/null
+++ b/sql/updates/10548_world_command.sql
@@ -0,0 +1,5 @@
+DELETE FROM `command` WHERE `name` LIKE 'channel set public';
+DELETE FROM `command` WHERE `name` LIKE 'channel set ownership';
+INSERT INTO `command` (`name`,`security`,`help`) VALUES
+('channel set ownership', 3, 'Syntax: .channel set ownership $channel [on/off]\n\n\Grant ownership to the first person that joins the channel.');
+
diff --git a/sql/updates/10548_world_trinity_string.sql b/sql/updates/10548_world_trinity_string.sql
new file mode 100644
index 00000000000..2bc5147133b
--- /dev/null
+++ b/sql/updates/10548_world_trinity_string.sql
@@ -0,0 +1,4 @@
+DELETE FROM `trinity_string` WHERE `entry` IN (5022, 5023);
+INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES
+(5022, 'Granting ownership to first person that joins the channel \"%s\": Enabled.'),
+(5023, 'Granting ownership to first person that joins the channel \"%s\": Disabled.');