aboutsummaryrefslogtreecommitdiff
path: root/src/game/Channel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Channel.cpp')
-rw-r--r--src/game/Channel.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/game/Channel.cpp b/src/game/Channel.cpp
index 154045b7674..87d669c089a 100644
--- a/src/game/Channel.cpp
+++ b/src/game/Channel.cpp
@@ -10,12 +10,12 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "Channel.h"
@@ -115,6 +115,13 @@ void Channel::Join(uint64 p, const char *pass)
SendToOne(&data, p);
JoinNotify(p);
+
+ // if no owner first logged will become
+ if(!IsConstant() && !m_ownerGUID)
+ {
+ SetOwner(p, (players.size() > 1 ? true : false));
+ players[p].SetModerator(true);
+ }
}
void Channel::Leave(uint64 p, bool send)