From: Lo?c C. <lo...@us...> - 2001-05-26 11:54:30
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands In directory usw-pr-cvs1:/tmp/cvs-serv24346/chat/lib/commands Modified Files: kick.cmd.php3 invite.cmd.php3 banish.cmd.php3 Log Message: Commands success messages are no long stored in $error var but in $success one Index: kick.cmd.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands/kick.cmd.php3,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** kick.cmd.php3 2001/04/19 21:05:04 1.3 --- kick.cmd.php3 2001/05/26 11:54:25 1.4 *************** *** 86,90 **** $targetCurrentRoom = pmcHandleMagicQuotes($targetCurrentRoom, '', 1, 'del'); if ($targetCurrentRoom != $dbSessionVars['currentRoom']) ! $error = sprintf(L_KICKED, $cmd[1]); $isCommand = true; --- 86,92 ---- $targetCurrentRoom = pmcHandleMagicQuotes($targetCurrentRoom, '', 1, 'del'); if ($targetCurrentRoom != $dbSessionVars['currentRoom']) ! { ! $success = sprintf(L_KICKED, $cmd[1]); ! } $isCommand = true; Index: invite.cmd.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands/invite.cmd.php3,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** invite.cmd.php3 2001/05/25 22:52:27 1.9 --- invite.cmd.php3 2001/05/26 11:54:25 1.10 *************** *** 41,45 **** else { - $currentTime = time(); $nickForNotifications = pmcSlashSingleQuotes(pmcSpecialChars($slashedNick, $latin1), 2); $roomForNotifications = pmcSlashSingleQuotes(pmcSpecialChars($slashedCurrentRoomName, 0), 2); --- 41,44 ---- *************** *** 61,65 **** . '\'SYS inviteTo\', ' . $latin1 . ', ' ! . $currentTime . ', ' . '\'%ADDRESSEE%\', ' . '\'#666699\', ' --- 60,64 ---- . '\'SYS inviteTo\', ' . $latin1 . ', ' ! . '%TIME%, ' . '\'%ADDRESSEE%\', ' . '\'#666699\', ' *************** *** 69,72 **** --- 68,72 ---- // Get all addressee and insert a message for each one of them + $currentTime = time(); $invitedUsers = explode(',', $cmd[2]); $invitedUsersCnt = count($invitedUsers); *************** *** 77,82 **** if ($invitedUsers[$i] == '') continue; $slashedInvited = pmcSlashSingleQuotes($invitedUsers[$i]); ! $currentQuery = str_replace('%ADDRESSEE%', $slashedInvited, $invitedQuery); $dbLink->query($currentQuery); } --- 77,83 ---- if ($invitedUsers[$i] == '') continue; + $currentQuery = str_replace('%TIME%', $currentTime + $i, $invitedQuery); $slashedInvited = pmcSlashSingleQuotes($invitedUsers[$i]); ! $currentQuery = str_replace('%ADDRESSEE%', $slashedInvited, $currentQuery); $dbLink->query($currentQuery); } *************** *** 84,91 **** // Define the success message for the sender ! $error = sprintf(L_INVITE_DONE, str_replace(',', ', ', $cmd[2])); ! $isCommand = true; ! $doRefreshMessages = true; } --- 85,92 ---- // Define the success message for the sender ! $success = sprintf(L_INVITE_DONE, str_replace(',', ', ', $cmd[2])); ! $isCommand = true; ! $doRefreshMessages = true; } Index: banish.cmd.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands/banish.cmd.php3,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** banish.cmd.php3 2001/04/21 19:35:33 1.8 --- banish.cmd.php3 2001/05/26 11:54:25 1.9 *************** *** 138,145 **** // from an other room than the current one if ($targetCurrentRoom != $dbSessionVars['currentRoom']) ! $error = sprintf(L_BANISHED, $cmd[2]); ! $isCommand = true; ! $doRefreshMessages = true; } // end of 'banishment allowed' } // end of 'target user is chatting' --- 138,147 ---- // from an other room than the current one if ($targetCurrentRoom != $dbSessionVars['currentRoom']) ! { ! $success = sprintf(L_BANISHED, $cmd[2]); ! } ! $isCommand = true; ! $doRefreshMessages = true; } // end of 'banishment allowed' } // end of 'target user is chatting' |