chat updates
This commit is contained in:
parent
5a8209f805
commit
135a55acee
3 changed files with 41 additions and 29 deletions
|
@ -9,7 +9,7 @@ class chat extends ajax_module{
|
|||
|
||||
function ajax(){
|
||||
global $session,$config,$db,$tpl,$log,$error,$ccache;
|
||||
$curl='chat';
|
||||
$curl='chat.funch.at';
|
||||
$locs=array('default'=>array(array('title'=>'N/A','name'=>'nolocation','icon'=>'nolocation.png')),'Ponyville'=>array(array('title'=>'N/A','name'=>'nolocation','icon'=>'nolocation.png'),array('title'=>'Marketplace','name'=>'marketplace','icon'=>'marketplace.png'),array('title'=>'SCC','name'=>'candycane','icon'=>'candycane.png'),array('title'=>'SAA','name'=>'apple','icon'=>'apple.png'),array('title'=>'Library','name'=>'book','icon'=>'book.png'),array('title'=>'Fountain','name'=>'fountain','icon'=>'fountain.png'),array('title'=>'Spa','name'=>'spa','icon'=>'spa.png'),array('title'=>'Hospital','name'=>'redcross','icon'=>'redcross.png'),array('title'=>'Guard-House','name'=>'shield','icon'=>'shield.png'),array('title'=>'Home','name'=>'house','icon'=>'house.png')),'Wilds'=>array(array('title'=>'N/A','name'=>'nolocation','icon'=>'nolocation.png'),array('title'=>'Everfree Forest','name'=>'everfree','icon'=>'everfree.png'),array('title'=>'Zecoras Hut','name'=>'zecora','icon'=>'zecora.png'),array('title'=>'Ghastly Gorge','name'=>'ghastlygorge','icon'=>'ghastlygorge.png'),array('title'=>'Old Castle Ruins','name'=>'castle','icon'=>'castle.png')));
|
||||
$weather=array('clear'=>array('day'=>array('name'=>'Sunny Day'),'night'=>array('name'=>'Clear Night')),'cloudy'=>array('night'=>array('name'=>'Cloudy Night'),'day'=>array('name'=>'Cloudy Day')),'drizzle'=>array('name'=>'Drizzle'),'rain'=>array('name'=>'Rain'),'rainbow'=>array('name'=>'Rainbow'),'fog'=>array('name'=>'Foggy'),'thunderstorm'=>array('name'=>'Thunderstorm'),'overcast'=>array('name'=>'Overcast'),'snow'=>array('name'=>'Snowing'),'snowstorm'=>array('name'=>'Blizzard'),'winter'=>array('name'=>'Winter'),'storm'=>array('name'=>'Stormy'));
|
||||
$adminweather=array('magicstorm'=>array('name'=>'Magical Storm'));
|
||||
|
@ -52,31 +52,30 @@ class chat extends ajax_module{
|
|||
}
|
||||
if($session->userdata['rp_admin']==1){
|
||||
$js="var menu = [
|
||||
{ name: \"kick\", action: function (element) { window.socket.send(\"/k \"+$(element).attr('id')); } },
|
||||
{ name: \"jail\", action: function (element) { window.socket.send(\"/jail \"+$(element).attr('id')); } },
|
||||
{ name: \"gag\", action: function (element) { window.socket.send(\"/gag \"+$(element).attr('id')); } },
|
||||
{ name: \"toggle private\", action: function (element) { window.socket.send(\"/tpc \"+$(element).attr('id')); } },
|
||||
{ name: \"ignore\", action: function (element) { window.socket.send(\"/ig \"+$(element).attr('id')); } },
|
||||
{ name: \"invite\", action: function (element) { window.socket.send(\"/i \"+$(element).attr('id')); } },
|
||||
{ name: \"catch\", action: function (element) { window.socket.send(\"/c \"+$(element).attr('id')); } },
|
||||
{ name: \"kick\", action: function (element) { sendMsg(\"/k \"+$(element).attr('id')); } },
|
||||
{ name: \"jail\", action: function (element) { sendMsg(\"/jail \"+$(element).attr('id')); } },
|
||||
{ name: \"gag\", action: function (element) { sendMsg(\"/gag \"+$(element).attr('id')); } },
|
||||
{ name: \"ignore\", action: function (element) { sendMsg(\"/ig \"+$(element).attr('id')); } },
|
||||
{ name: \"invite\", action: function (element) { sendMsg(\"/i \"+$(element).attr('id')); } },
|
||||
{ name: \"catch\", action: function (element) { sendMsg(\"/c \"+$(element).attr('id')); } },
|
||||
{ name: \"whisperwindow\", action: function (element) { if ($('#'+$(element).attr('id')+'_whisper').length > 0){
|
||||
$('#'+$(element).attr('id')+'_whisper').dialog('open');
|
||||
$('#'+$(element).attr('id')+'_whisper').dialog('moveToTop');
|
||||
}else{
|
||||
cwhisp($(element).attr('id'),\"\");
|
||||
create_whisper($(element).attr('id'),\"\");
|
||||
} } },
|
||||
{ name: \"report\", action: function (element) { reportwindow($(element).attr('id')); } },
|
||||
{ name: \"reports\", action: function (element) { window.socket.send(\"/rel \"+$(element).attr('id')); } }
|
||||
{ name: \"reports\", action: function (element) { sendMsg(\"/rel \"+$(element).attr('id')); } }
|
||||
];";
|
||||
}else{
|
||||
$js="var menu = [
|
||||
{ name: \"ignore\", action: function (element) { window.socket.send(\"/ig \"+$(element).attr('id')); } },
|
||||
{ name: \"invite\", action: function (element) { window.socket.send(\"/i \"+$(element).attr('id')); } },
|
||||
{ name: \"ignore\", action: function (element) { sendMsg(\"/ig \"+$(element).attr('id')); } },
|
||||
{ name: \"invite\", action: function (element) { sendMsg(\"/i \"+$(element).attr('id')); } },
|
||||
{ name: \"whisperwindow\", action: function (element) { if ($('#'+$(element).attr('id')+'_whisper').length > 0){
|
||||
$('#'+$(element).attr('id')+'_whisper').dialog('open');
|
||||
$('#'+$(element).attr('id')+'_whisper').dialog('moveToTop');
|
||||
}else{
|
||||
cwhisp($(element).attr('id'),\"\");
|
||||
create_whisper($(element).attr('id'),\"\");
|
||||
} } },
|
||||
{ name: \"report\", action: function (element) { reportwindow($(element).attr('id')); } }
|
||||
];";
|
||||
|
@ -127,26 +126,26 @@ class chat extends ajax_module{
|
|||
}
|
||||
if($session->userdata['rp_admin']==1){
|
||||
$js="var menu = [
|
||||
{ name: \"kick\", action: function (element) { window.socket.send(\"/k \"+$(element).attr('id')); } },
|
||||
{ name: \"jail\", action: function (element) { window.socket.send(\"/jail \"+$(element).attr('id')); } },
|
||||
{ name: \"gag\", action: function (element) { window.socket.send(\"/gag \"+$(element).attr('id')); } },
|
||||
{ name: \"toggle private\", action: function (element) { window.socket.send(\"/tpc \"+$(element).attr('id')); } },
|
||||
{ name: \"ignore\", action: function (element) { window.socket.send(\"/ig \"+$(element).attr('id')); } },
|
||||
{ name: \"invite\", action: function (element) { window.socket.send(\"/i \"+$(element).attr('id')); } },
|
||||
{ name: \"catch\", action: function (element) { window.socket.send(\"/c \"+$(element).attr('id')); } },
|
||||
{ name: \"kick\", action: function (element) { sendMsg(\"/k \"+$(element).attr('id')); } },
|
||||
{ name: \"jail\", action: function (element) { sendMsg(\"/jail \"+$(element).attr('id')); } },
|
||||
{ name: \"gag\", action: function (element) { socket.send(\"/gag \"+$(element).attr('id')); } },
|
||||
{ name: \"toggle private\", action: function (element) { sendMsg(\"/tpc \"+$(element).attr('id')); } },
|
||||
{ name: \"ignore\", action: function (element) { sendMsg(\"/ig \"+$(element).attr('id')); } },
|
||||
{ name: \"invite\", action: function (element) { sendMsg(\"/i \"+$(element).attr('id')); } },
|
||||
{ name: \"catch\", action: function (element) { sendMsg(\"/c \"+$(element).attr('id')); } },
|
||||
{ name: \"whisperwindow\", action: function (element) { if ($('#'+$(element).attr('id')+'_whisper').length > 0){
|
||||
$('#'+$(element).attr('id')+'_whisper').dialog('open');
|
||||
$('#'+$(element).attr('id')+'_whisper').dialog('moveToTop');
|
||||
}else{
|
||||
cwhisp($(element).attr('id'),\"\");
|
||||
create_whisper($(element).attr('id'),\"\");
|
||||
} } },
|
||||
{ name: \"report\", action: function (element) { reportwindow($(element).attr('id')); } },
|
||||
{ name: \"reports\", action: function (element) { window.socket.send(\"/rel \"+$(element).attr('id')); } }
|
||||
{ name: \"reports\", action: function (element) { sendMsg(\"/rel \"+$(element).attr('id')); } }
|
||||
];";
|
||||
}else{
|
||||
$js="var menu = [
|
||||
{ name: \"ignore\", action: function (element) { window.socket.send(\"/ig \"+$(element).attr('id')); } },
|
||||
{ name: \"invite\", action: function (element) { window.socket.send(\"/i \"+$(element).attr('id')); } },
|
||||
{ name: \"ignore\", action: function (element) { sendMsg(\"/ig \"+$(element).attr('id')); } },
|
||||
{ name: \"invite\", action: function (element) { sendMsg(\"/i \"+$(element).attr('id')); } },
|
||||
{ name: \"report\", action: function (element) { reportwindow($(element).attr('id')); } }
|
||||
];";
|
||||
}
|
||||
|
|
|
@ -564,7 +564,6 @@ function inmeta2(){
|
|||
$meta.="<script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js?ver=1213232\"></script>
|
||||
<link rel=\"stylesheet\" media=\"screen\" type=\"text/css\" href=\"/modules/chat/colorpicker/spectrum.css\" />
|
||||
<script type=\"text/javascript\" src=\"/modules/chat/colorpicker/spectrum.js\"></script>
|
||||
<script type=\"text/javascript\" src=\"/modules/chat/js/cowboy.js\"></script>
|
||||
<script src=\"/modules/chat/js/tab.min.js?id=892191\" type=\"text/javascript\" ></script>
|
||||
<script type=\"text/javascript\">
|
||||
var ulist;
|
||||
|
@ -909,12 +908,12 @@ function inmeta2(){
|
|||
|
||||
// For IE and Firefox prior to version 4
|
||||
if (e && doit) {
|
||||
e.returnValue = 'Are you sure you want to leave? There is an active chat session!';
|
||||
e.returnValue = 'Willst du das Fenster wirklich schließen?';
|
||||
}
|
||||
|
||||
// For Safari
|
||||
if(doit){
|
||||
return 'Are you sure you want to leave? There is an active chat session!';
|
||||
return 'Willst du das Fenster wirklich schließen?';
|
||||
}
|
||||
};
|
||||
var tabcom = new TabCompleter($(\"#text\").get(0));
|
||||
|
@ -941,7 +940,7 @@ function inmeta2(){
|
|||
sendMsg('/q');
|
||||
});
|
||||
|
||||
jQuery('.functions').html('<h4>Chat Color</h4><input id=\"colorSelector\" type=\"text\" style=\"float:left;\" \>');
|
||||
jQuery('.functions').html('<h4>Chatfarbe</h4><input id=\"colorSelector\" type=\"text\" style=\"float:left;\" \>');
|
||||
$('#colorSelector').spectrum({
|
||||
showInput: true,
|
||||
preferredFormat: \"hex\",
|
||||
|
@ -961,6 +960,17 @@ function inmeta2(){
|
|||
room($(this).attr('id'));
|
||||
});
|
||||
|
||||
function cwhisp(name, inittext, youfirst) {
|
||||
var charimg='';
|
||||
$.ajax({
|
||||
url: \"ajax.php\",
|
||||
data: { task: \"chat\",call: \"getid\", char: name},
|
||||
success: function(data) {
|
||||
create_whisper(name, inittext, youfirst, data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('body').on('click', 'span.user_whisper', function() {
|
||||
if(whwind ==true){
|
||||
if ($('#'+$(this).attr('title')+'_whisper').length > 0){
|
||||
|
|
|
@ -311,4 +311,7 @@ txtPListEnd|SourceUser = <span class="info">Es gibt <%Count%> Raum SUs.</span><b
|
|||
#Catch
|
||||
txtUserCatchedRoom|SourceRoom = <span class="info"><span style="color: #<%DestColor%>;"><%DestNick%></span> wird von <span style="color: #<%SourceColor%>;"><%SourceNick%></span> in den Raum teleportiert.</span><br />
|
||||
txtUserCatchedRoom|DestUser = <span class="info">Du wurdest von <span style="color: #<%SourceColor%>;"><%SourceNick%></span> in den Raum <%Room%> teleportiert.</span><br />
|
||||
txtUserCatchedRoom|DestOldRoom = <span class="info"><span style="color: #<%DestColor%>;"><%DestNick%></span> wurde von <span style="color: #<%SourceColor%>;"><%SourceNick%></span> in den Raum <%Room%> teleportiert.</span><br />
|
||||
txtUserCatchedRoom|DestOldRoom = <span class="info"><span style="color: #<%DestColor%>;"><%DestNick%></span> wurde von <span style="color: #<%SourceColor%>;"><%SourceNick%></span> in den Raum <%Room%> teleportiert.</span><br />
|
||||
|
||||
#FunMessage
|
||||
txtFunMessage|SourceRoom = <span class="time">(<%Time%>) </span><span style="color: #<%SourceColor%>;">%(<%id%>)%<%SourceNick%>: <%Message%></span><br>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue