ec check
This commit is contained in:
parent
834aef432e
commit
4a21130567
|
@ -74,3 +74,14 @@ indent_size = 4
|
||||||
[~/SublimeText/*.sublime-*]
|
[~/SublimeText/*.sublime-*]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
|
[~/Gambas/*]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[~/Solar2D/**]
|
||||||
|
indent_style = unset
|
||||||
|
indent_size = unset
|
||||||
|
end_of_line = unset
|
||||||
|
charset = unset
|
||||||
|
trim_trailing_whitespace = unset
|
||||||
|
insert_final_newline = unset
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# https://linuxconcept.com/making-a-simple-irc-chat-bot-logger-using-bash-script/
|
# https://linuxconcept.com/making-a-simple-irc-chat-bot-logger-using-bash-script/
|
||||||
|
|
||||||
nick="blb$$"
|
nick="blb$$"
|
||||||
channel=admin
|
channel=admin
|
||||||
server=iiiypuk.me
|
server=iiiypuk.me
|
||||||
config=/tmp/irclog
|
config=/tmp/irclog
|
||||||
[ -n "$1" ] && channel=$1
|
[ -n "$1" ] && channel=$1
|
||||||
[ -n "$2" ] && server=$2
|
[ -n "$2" ] && server=$2
|
||||||
config="${config}_${channel}"
|
config="${config}_${channel}"
|
||||||
echo "NICK $nick" > $config
|
echo "NICK $nick" > $config
|
||||||
echo "USER $nick +i * :$0" >> $config
|
echo "USER $nick +i * :$0" >> $config
|
||||||
echo "JOIN #$channel" >> $config
|
echo "JOIN #$channel" >> $config
|
||||||
trap "rm -f $config;exit 0" INT TERM EXIT
|
trap "rm -f $config;exit 0" INT TERM EXIT
|
||||||
tail -f $config | nc $server 6667 | while read MESSAGE
|
tail -f $config | nc $server 6667 | while read MESSAGE
|
||||||
do
|
do
|
||||||
case "$MESSAGE" in
|
case "$MESSAGE" in
|
||||||
PING*) echo "PONG${MESSAGE#PING}" >> $config;; *QUIT*) ;;
|
PING*) echo "PONG${MESSAGE#PING}" >> $config;; *QUIT*) ;;
|
||||||
*PART*) ;;
|
*PART*) ;;
|
||||||
*JOIN*) ;;
|
*JOIN*) ;;
|
||||||
*NICK*) ;;
|
*NICK*) ;;
|
||||||
*PRIVMSG*) echo "${MESSAGE}" | sed -nr "s/^:([^!]+).*PRIVMSG[^:]+:(.*)/[$(date '+%R')] \1> \2/p" >> $config;;
|
*PRIVMSG*) echo "${MESSAGE}" | sed -nr "s/^:([^!]+).*PRIVMSG[^:]+:(.*)/[$(date '+%R')] \1> \2/p" >> $config;;
|
||||||
*) echo "${MESSAGE}";;
|
*) echo "${MESSAGE}";;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
body{
|
body{
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background-image: url('../img/landing.jpg');
|
background-image: url('../img/landing.jpg');
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: center center;
|
background-position: center center;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,22 +107,22 @@
|
||||||
```html
|
```html
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="ru">
|
<html lang="ru">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Заголовок страницы</title>
|
<title>Заголовок страницы</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header class="main-header">
|
<header class="main-header">
|
||||||
<!— Шапка сайта —>
|
<!— Шапка сайта —>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<!— Основное содержимое страницы —>
|
<!— Основное содержимое страницы —>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer class="main-footer">
|
<footer class="main-footer">
|
||||||
<!— Подвал сайта —>
|
<!— Подвал сайта —>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
# Fenom
|
# Fenom
|
||||||
|
|
||||||
## IF . ELSEIF . ELSE
|
## IF . ELSEIF . ELSE
|
||||||
|
|
||||||
```
|
```
|
||||||
{if <expression>}
|
{if <expression>}
|
||||||
{* ...code... *}
|
{* ...code... *}
|
||||||
{elseif <expression>}
|
{elseif <expression>}
|
||||||
{* ...code... *}
|
{* ...code... *}
|
||||||
{else}
|
{else}
|
||||||
{* ...code... *}
|
{* ...code... *}
|
||||||
{/if}
|
{/if}
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
// gettype(mixed $value): string
|
// gettype(mixed $value): string
|
||||||
$value = 1;
|
$value = 1;
|
||||||
|
|
||||||
// Return Values
|
// Return Values
|
||||||
// Possible values for the returned string are:
|
// Possible values for the returned string are:
|
||||||
//
|
//
|
||||||
// "boolean"
|
// "boolean"
|
||||||
// "integer"
|
// "integer"
|
||||||
// "double" (for historical reasons "double" is returned in case of a float, and not simply "float")
|
// "double" (for historical reasons "double" is returned in case of a float, and not simply "float")
|
||||||
// "string"
|
// "string"
|
||||||
// "array"
|
// "array"
|
||||||
// "object"
|
// "object"
|
||||||
// "resource"
|
// "resource"
|
||||||
// "resource (closed)" as of PHP 7.2.0
|
// "resource (closed)" as of PHP 7.2.0
|
||||||
// "NULL"
|
// "NULL"
|
||||||
// "unknown type"
|
// "unknown type"
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -77,21 +77,21 @@
|
||||||
$message = '
|
$message = '
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Birthday Reminders for August</title>
|
<title>Birthday Reminders for August</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<p>Here are the birthdays upcoming in August!</p>
|
<p>Here are the birthdays upcoming in August!</p>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Person</th><th>Day</th><th>Month</th><th>Year</th>
|
<th>Person</th><th>Day</th><th>Month</th><th>Year</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Johny</td><td>10th</td><td>August</td><td>1970</td>
|
<td>Johny</td><td>10th</td><td>August</td><td>1970</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Sally</td><td>17th</td><td>August</td><td>1973</td>
|
<td>Sally</td><td>17th</td><td>August</td><td>1973</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
';
|
';
|
||||||
|
|
|
@ -16,14 +16,14 @@ irc.send(str.encode('NICK ' + botnick + '\n'))
|
||||||
irc.send(str.encode('JOIN '+ channel +'\n'))
|
irc.send(str.encode('JOIN '+ channel +'\n'))
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
text = irc.recv(2040)
|
text = irc.recv(2040)
|
||||||
print(text)
|
print(text)
|
||||||
|
|
||||||
if text.find(str.encode('PING')) != -1:
|
if text.find(str.encode('PING')) != -1:
|
||||||
irc.send(str.encode('PONG ' + str(text.split()[1]) + '\r\n'))
|
irc.send(str.encode('PONG ' + str(text.split()[1]) + '\r\n'))
|
||||||
|
|
||||||
# !time - return current timestamp
|
# !time - return current timestamp
|
||||||
if text.find(str.encode('!time')) != -1:
|
if text.find(str.encode('!time')) != -1:
|
||||||
ts = time.time()
|
ts = time.time()
|
||||||
irc.send(str.encode('PRIVMSG #admin :{}\r\n'.format(int(ts))))
|
irc.send(str.encode('PRIVMSG #admin :{}\r\n'.format(int(ts))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue