Skip to content

Commit

Permalink
OnNostr
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolat committed Jul 15, 2024
1 parent 02c6535 commit 2afb215
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
62 changes: 62 additions & 0 deletions ghost/master/dic/ex/Nostr/nostr.dic
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
OnNostr
{
_protocol_version = reference[0]
_kind = reference[1]
if _protocol_version != 'Nostr/0.4' || _kind != 42
'\e'
_content = reference[2]
if RE_SEARCH(_content, 'sutehai\?\ssutehai\s([1-9][mpsz])') {
"\0\_q%(RE_GETSTR()[1])\e"
}
elseif RE_SEARCH(_content, 'naku\?\s(ron|kan|pon|chi)(\s[1-9][mpsz]\s[1-9][mpsz])?') {
_word = RE_GETSTR()[1]
_say = ''
_aqtk = ''
case _word {
when 'chi' {
_say = '\s[6]チー'
_aqtk = "ち'ー"
}
when 'pon' {
_say = '\s[6]ポン'
_aqtk = "ぽ'ん"
}
when 'kan' {
_say = '\s[6]カン'
_aqtk = "か'ん"
}
when 'ron' {
_say = '\s[8]ロン'
_aqtk = "ろ'ん"
}
}
"\0\_q%(_say)\e"
if _aqtk != ''
AQ.ExecAqtk(_aqtk)
}
elseif RE_SEARCH(_content, 'sutehai\?\s(ankan|kakan|richi|tsumo)(\s[1-9][mpsz])?') {
_word = RE_GETSTR()[1]
_say = ''
_aqtk = ''
case _word {
when 'tsumo' {
_say = '\s[5]ツモ'
_aqtk = "つ'も"
}
when 'richi' {
_say = '\s[5]リーチ'
_aqtk = "り'ーち"
MJ.Save.Richi = 1
}
when 'ankan', 'kakan' {
_say = '\s[6]カン'
_aqtk = "か'ん"
}
}
"\0\_q%(_say)\e"
AQ.ExecAqtk(_aqtk)
}
else {
'\e'
}
}
1 change: 1 addition & 0 deletions ghost/master/system_config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ dicdir, dic/system // YAYA:システム辞書。必ず最初に指定するこ
iolog.filter.mode, allowlist
iolog.filter.keyword, OnMahjong
iolog.filter.keyword, OnPoker
iolog.filter.keyword, OnNostr
1 change: 1 addition & 0 deletions ghost/master/yaya.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ messagetxt, messagetxt/japanese.txt // ログに記録されるエラーメッ
dicdir, dic/normal
dicdir, dic/ex/Mahjong
dicdir, dic/ex/TexasHoldem
dicdir, dic/ex/Nostr

//------------------------------------------------------------------------------
//セーブファイル暗号化
Expand Down

0 comments on commit 2afb215

Please sign in to comment.