Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PHP-Chat
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BA_SST
PHP-Chat
Commits
58c63acd
Commit
58c63acd
authored
Jul 26, 2016
by
Nico Schallehn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Kommando Befehl eingeführt
parent
66361973
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
config.php
config.php
+10
-2
No files found.
config.php
View file @
58c63acd
...
@@ -28,18 +28,26 @@ function ChatNachricht($text, $admin, $userchange ){
...
@@ -28,18 +28,26 @@ function ChatNachricht($text, $admin, $userchange ){
if
((
substr
(
trim
(
$text
),
0
,
3
)
==
"/p "
)
OR
(
substr
(
trim
(
$text
),
0
,
3
)
==
"/w "
))
if
((
substr
(
trim
(
$text
),
0
,
3
)
==
"/p "
)
OR
(
substr
(
trim
(
$text
),
0
,
3
)
==
"/w "
))
{
{
$end
=
strpos
(
$text
,
":"
);
$end
=
strpos
(
$text
,
":"
);
$privateAntwort
=
true
;
$name
=
substr
(
$text
,
3
,
$end
-
3
);
$name
=
substr
(
$text
,
3
,
$end
-
3
);
$UserID
=
UsernametoID
(
$name
);
$UserID
=
UsernametoID
(
$name
);
$text
=
substr
(
$text
,
$end
+
1
);
$text
=
substr
(
$text
,
$end
+
1
);
if
((
$UserID
==
false
)){
if
((
$UserID
==
false
)){
$privateAntwort
=
true
;
$JamesText
=
"Deine Nachricht an "
.
$name
.
" konnte ich leider nicht zustellen, da der Benutzer nicht existiert! :-("
;
$JamesText
=
"Deine Nachricht an "
.
$name
.
" konnte ich leider nicht zustellen, da der Benutzer nicht existiert! :-("
;
}
}
}
}
if
((
trim
(
$text
)
==
"/Komandos"
)
OR
(
trim
(
$text
)
==
"/Befehle"
)
OR
(
trim
(
$text
)
==
"/commands"
)){
$privateAntwort
=
true
;
$JamesText
=
"Folgende Befehle unterstützt dieser Chat:
<li>
<ul>/w [Username]:[Nachricht] - sendet eine private Nachricht (/p ist alias)</ul>
<ul>/commands - gibt diese Hilfe aus</ul>
</li>"
;
}
if
(
$privateAntwort
){
if
(
$privateAntwort
){
sendMessage
(
$JamesText
,
1
,
0
,
0
,
$admin
,
$time
,
0
,
$_SESSION
[
'chatuserid'
]);
sendMessage
(
$JamesText
,
1
,
0
,
0
,
$admin
,
time
()
,
0
,
$_SESSION
[
'chatuserid'
]);
}
else
{
}
else
{
sendMessage
(
$text
,
$_SESSION
[
'chatuserid'
],
$userchange
,
0
,
$admin
,
time
(),
0
,
$UserID
);
sendMessage
(
$text
,
$_SESSION
[
'chatuserid'
],
$userchange
,
0
,
$admin
,
time
(),
0
,
$UserID
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment