|
〜〜Hidenet_sub.hsc〜〜
SetHeader: ;ヘッダをつける
##n = #1
if( %HideHeader != "" )
@output[##n] = %HideHeader
call 特殊文字変換 @output[##n], #2
@output[##n] = #return
##n = ##n + 1
elseif( %HideHeaderFile != "" )
openfile %HideHeaderFile
if( no )
message %HideHeaderFile + "のオープンに失敗しました。"
else
while(1)
readfile %HideHeaderFile, @output[##n]
if( no )
breakloop
endif
call 特殊文字変換 @output[##n], #2
@output[##n] = #return
##n = ##n + 1
endwhile
closefile %HideHeaderFile
endif
endif
return ##n
SetResHeader: ;レス用のヘッダをつける
##n = #1
if( %HideResHeader != "" )
@output[##n] = %HideResHeader
call 特殊文字変換 @output[##n], #2
@output[##n] = #return
##n = ##n + 1
elseif( %HideResHeaderFile != "" )
openfile %HideResHeaderFile
if( no )
message %HideResHeaderFile + "のオープンに失敗しました。"
else
while(1)
readfile %HideResHeaderFile, @output[##n]
if( no )
breakloop
endif
call 特殊文字変換 @output[##n], #2
@output[##n] = #return
##n = ##n + 1
endwhile
closefile %HideResHeaderFile
endif
endif
return ##n
SetSign: ;シグネチャ(署名)をつける
##n = #1
if( %HideSign != "" )
@output[##n] = %HideSign
call 特殊文字変換 @output[##n], #2
@output[##n] = #return
##n = ##n + 1
elseif( %HideSignFile != "" )
openfile %HideSignFile
if( no )
message %HideSignFile + "のオープンに失敗しました。"
else
while(1)
readfile %HideSignFile, @output[##n]
if( no )
breakloop
endif
call 特殊文字変換 @output[##n], #2
@output[##n] = #return
##n = ##n + 1
endwhile
closefile %HideSignFile
endif
endif
@output[##n] = "/E"
@@output = ##n + 1
return
MesTitle: ;元発言のタイトル取得
##n = #1
readbuffer @@SpeechPos[3], #line
if( part( #line, 3, 1 ) == "/" ) ;合っているか確証な
し
#res = part( #line, 0, 3 )
#Mes_title = part( #line, 46, 255 )
if( part( #Mes_title, 0, 3 ) == "RE:" )
#Mes_title = part( #Mes_title, 7, 255 )
endif
else
#res = part( #line, 0, 5 ) ;確証済み
#Mes_title = part( #line, 40, 255 )
if( part( #Mes_title, 0, 3 ) == "RE:" )
#Mes_title = part( #Mes_title, 9, 255 )
endif
endif
@output[##n] = "RE:" + #res + " " + #Mes_title
return
GetMesHandle: ;発言者のハンドルを取得
readbuffer @@SpeechPos[3], #line
if( part( #line, 3, 1 ) == "/" )
#name = part( #line, 19, 21 ) ;確証なし
else
#name = part( #line, 21, 19 )
endif
while( part( #name, length( #name ) - 1, 1 ) == " " )
#name = dropback( #name, " " )
endwhile
return #name
特殊文字変換: ;特殊文字変換
;特殊文字の頭に使う文字(例:#MesNo)
#SPC[0] = "#"
;特殊文字列
#SPC[1] = "MesNo"
#SPC[2] = "MesID"
#SPC[3] = "MesHandle"
#SPC[4] = "MesTitle"
#SPC[5] = "RoomTitle"
#SPC[6] = "RoomNo"
#SPC[7] = "ForumGO"
#SPC[8] = "ForumTitle"
#SPC[9] = "PatioID"
#line = #1
while( ##i <= 9 )
#Front = drop( #line, #SPC[0] + #SPC[##i] )
if( ##i == 0 )
#Henkan = #SPC[0]
else
checklabel "Get" + #SPC[##i]
if( yes ) callvarlabel "Get" + #SPC[##i], #2
#Henkan = #return
endif
#Back = part( search( #line, #SPC[0] + #SPC[##i] ), length( #SPC[0]
+ #SPC[##i] ), 255 )
if( #line != #Front )
#line = #Front + #Henkan + #Back
endif
##i = ##i + 1
endwhile
return #line
|
|