From 0445fb790ec849dcebf0938f91f37f6ee304d938 Mon Sep 17 00:00:00 2001 From: Protocol Date: Thu, 8 Nov 2012 15:51:40 +0000 Subject: [PATCH] Update MediaWiki page '135 Protocol' --- 135-Protocol.mediawiki | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/135-Protocol.mediawiki b/135-Protocol.mediawiki index dba2b69..a1e9275 100644 --- a/135-Protocol.mediawiki +++ b/135-Protocol.mediawiki @@ -56,7 +56,7 @@ This page refers to the RSC #135 client revision. ;; Opcode: 10 (defn report-abuse [stream username] (let [name (.substring username 12) - l5 (Util/long-for-name name)] + l5 (Util/long-for-name name)] (doto stream (.begin-packet 10) (.put-int64 l5) @@ -76,6 +76,15 @@ This page refers to the RSC #135 client revision. (.put-int64 name) (.end-packet))) +;; Opcode: 28 +;; name is long representation of username, message is byte representation of message (.getBytes message), length is length of message (maximum length is 200) +(defn send-message [stream name message length] + (doto stream + (.begin-packet 28) + (.put-int64 username) + (.read-bytes message 0 length) + (.end-packet))) + ;; Opcode: 29 (defn add-ignore [stream username] ; username is string representation of username (let [name (Util/name-for-long username)]