snacs_string.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. package wire
  2. var foodGroupName = map[uint16]string{
  3. OService: "OService",
  4. Locate: "Locate",
  5. Buddy: "Buddy",
  6. ICBM: "ICBM",
  7. Advert: "Advert",
  8. Invite: "Invite",
  9. Admin: "Admin",
  10. Popup: "Popup",
  11. PermitDeny: "PermitDeny",
  12. UserLookup: "UserLookup",
  13. Stats: "Stats",
  14. Translate: "Translate",
  15. ChatNav: "ChatNav",
  16. Chat: "Chat",
  17. ODir: "ODir",
  18. BART: "BART",
  19. Feedbag: "Feedbag",
  20. ICQ: "ICQ",
  21. BUCP: "BUCP",
  22. Alert: "Alert",
  23. Plugin: "Plugin",
  24. UnnamedFG24: "UnnamedFG24",
  25. MDir: "MDir",
  26. ARS: "ARS",
  27. }
  28. // FoodGroupName gets the string name of a food group. It returns "unknown" if
  29. // the food group doesn't exist.
  30. func FoodGroupName(foodGroup uint16) string {
  31. name := foodGroupName[foodGroup]
  32. if name == "" {
  33. name = "unknown"
  34. }
  35. return name
  36. }
  37. var subGroupName = map[uint16]map[uint16]string{
  38. OService: {
  39. OServiceErr: "OServiceErr",
  40. OServiceClientOnline: "OServiceClientOnline",
  41. OServiceHostOnline: "HostOnline",
  42. OServiceServiceRequest: "OServiceServiceRequest",
  43. OServiceServiceResponse: "OServiceServiceResponse",
  44. OServiceRateParamsQuery: "OServiceRateParamsQuery",
  45. OServiceRateParamsReply: "OServiceRateParamsReply",
  46. OServiceRateParamsSubAdd: "OServiceRateParamsSubAdd",
  47. OServiceRateDelParamSub: "OServiceRateDelParamSub",
  48. OServiceRateParamChange: "OServiceRateParamChange",
  49. OServicePauseReq: "OServicePauseReq",
  50. OServicePauseAck: "OServicePauseAck",
  51. OServiceResume: "OServiceResume",
  52. OServiceUserInfoQuery: "OServiceUserInfoQuery",
  53. OServiceUserInfoUpdate: "OServiceUserInfoUpdate",
  54. OServiceEvilNotification: "OServiceEvilNotification",
  55. OServiceIdleNotification: "OServiceIdleNotification",
  56. OServiceMigrateGroups: "OServiceMigrateGroups",
  57. OServiceMotd: "OServiceMotd",
  58. OServiceSetPrivacyFlags: "OServiceSetPrivacyFlags",
  59. OServiceWellKnownUrls: "OServiceWellKnownUrls",
  60. OServiceNoop: "OServiceNoop",
  61. OServiceClientVersions: "ClientVersions",
  62. OServiceHostVersions: "OServiceHostVersions",
  63. OServiceMaxConfigQuery: "OServiceMaxConfigQuery",
  64. OServiceMaxConfigReply: "OServiceMaxConfigReply",
  65. OServiceStoreConfig: "OServiceStoreConfig",
  66. OServiceConfigQuery: "OServiceConfigQuery",
  67. OServiceConfigReply: "OServiceConfigReply",
  68. OServiceSetUserInfoFields: "OServiceSetUserInfoFields",
  69. OServiceProbeReq: "OServiceProbeReq",
  70. OServiceProbeAck: "OServiceProbeAck",
  71. OServiceBartReply: "OServiceBartReply",
  72. OServiceBartQuery2: "OServiceBartQuery2",
  73. OServiceBartReply2: "OServiceBartReply2",
  74. },
  75. Locate: {
  76. LocateErr: "LocateErr",
  77. LocateRightsQuery: "LocateRightsQuery",
  78. LocateRightsReply: "LocateRightsReply",
  79. LocateSetInfo: "LocateSetInfo",
  80. LocateUserInfoQuery: "LocateUserInfoQuery",
  81. LocateUserInfoReply: "LocateUserInfoReply",
  82. LocateWatcherSubRequest: "LocateWatcherSubRequest",
  83. LocateWatcherNotification: "LocateWatcherNotification",
  84. LocateSetDirInfo: "LocateSetDirInfo",
  85. LocateSetDirReply: "LocateSetDirReply",
  86. LocateGetDirInfo: "LocateGetDirInfo",
  87. LocateGetDirReply: "LocateGetDirReply",
  88. LocateGroupCapabilityQuery: "LocateGroupCapabilityQuery",
  89. LocateGroupCapabilityReply: "LocateGroupCapabilityReply",
  90. LocateSetKeywordInfo: "LocateSetKeywordInfo",
  91. LocateSetKeywordReply: "LocateSetKeywordReply",
  92. LocateGetKeywordInfo: "LocateGetKeywordInfo",
  93. LocateGetKeywordReply: "LocateGetKeywordReply",
  94. LocateFindListByEmail: "LocateFindListByEmail",
  95. LocateFindListReply: "LocateFindListReply",
  96. LocateUserInfoQuery2: "LocateUserInfoQuery2",
  97. },
  98. Buddy: {
  99. BuddyErr: "BuddyErr",
  100. BuddyRightsQuery: "BuddyRightsQuery",
  101. BuddyRightsReply: "BuddyRightsReply",
  102. BuddyAddBuddies: "BuddyAddBuddies",
  103. BuddyDelBuddies: "BuddyDelBuddies",
  104. BuddyWatcherListQuery: "BuddyWatcherListQuery",
  105. BuddyWatcherListResponse: "BuddyWatcherListResponse",
  106. BuddyWatcherSubRequest: "BuddyWatcherSubRequest",
  107. BuddyWatcherNotification: "BuddyWatcherNotification",
  108. BuddyRejectNotification: "BuddyRejectNotification",
  109. BuddyArrived: "BuddyArrived",
  110. BuddyDeparted: "BuddyDeparted",
  111. BuddyAddTempBuddies: "BuddyAddTempBuddies",
  112. BuddyDelTempBuddies: "BuddyDelTempBuddies",
  113. },
  114. ICBM: {
  115. ICBMErr: "ICBMErr",
  116. ICBMAddParameters: "ICBMAddParameters",
  117. ICBMDelParameters: "ICBMDelParameters",
  118. ICBMParameterQuery: "ICBMParameterQuery",
  119. ICBMParameterReply: "ICBMParameterReply",
  120. ICBMChannelMsgToHost: "ICBMChannelMsgToHost",
  121. ICBMChannelMsgToClient: "ICBMChannelMsgToClient",
  122. ICBMEvilRequest: "ICBMEvilRequest",
  123. ICBMEvilReply: "ICBMEvilReply",
  124. ICBMMissedCalls: "ICBMMissedCalls",
  125. ICBMClientErr: "ICBMClientErr",
  126. ICBMHostAck: "ICBMHostAck",
  127. ICBMSinStored: "ICBMSinStored",
  128. ICBMSinListQuery: "ICBMSinListQuery",
  129. ICBMSinListReply: "ICBMSinListReply",
  130. ICBMSinRetrieve: "ICBMSinRetrieve",
  131. ICBMSinDelete: "ICBMSinDelete",
  132. ICBMNotifyRequest: "ICBMNotifyRequest",
  133. ICBMNotifyReply: "ICBMNotifyReply",
  134. ICBMClientEvent: "ICBMClientEvent",
  135. ICBMSinReply: "ICBMSinReply",
  136. },
  137. ChatNav: {
  138. ChatNavErr: "ChatNavErr",
  139. ChatNavRequestChatRights: "ChatNavRequestChatRights",
  140. ChatNavRequestExchangeInfo: "ChatNavRequestExchangeInfo",
  141. ChatNavRequestRoomInfo: "ChatNavRequestRoomInfo",
  142. ChatNavRequestMoreRoomInfo: "ChatNavRequestMoreRoomInfo",
  143. ChatNavRequestOccupantList: "ChatNavRequestOccupantList",
  144. ChatNavSearchForRoom: "ChatNavSearchForRoom",
  145. ChatNavCreateRoom: "ChatNavCreateRoom",
  146. ChatNavNavInfo: "ChatNavNavInfo",
  147. },
  148. Chat: {
  149. ChatErr: "ChatErr",
  150. ChatRoomInfoUpdate: "ChatRoomInfoUpdate",
  151. ChatUsersJoined: "ChatUsersJoined",
  152. ChatUsersLeft: "ChatUsersLeft",
  153. ChatChannelMsgToHost: "ChatChannelMsgToHost",
  154. ChatChannelMsgToClient: "ChatChannelMsgToClient",
  155. ChatEvilRequest: "ChatEvilRequest",
  156. ChatEvilReply: "ChatEvilReply",
  157. ChatClientErr: "ChatClientErr",
  158. ChatPauseRoomReq: "ChatPauseRoomReq",
  159. ChatPauseRoomAck: "ChatPauseRoomAck",
  160. ChatResumeRoom: "ChatResumeRoom",
  161. ChatShowMyRow: "ChatShowMyRow",
  162. ChatShowRowByUsername: "ChatShowRowByUsername",
  163. ChatShowRowByNumber: "ChatShowRowByNumber",
  164. ChatShowRowByName: "ChatShowRowByName",
  165. ChatRowInfo: "ChatRowInfo",
  166. ChatListRows: "ChatListRows",
  167. ChatRowListInfo: "ChatRowListInfo",
  168. ChatMoreRows: "ChatMoreRows",
  169. ChatMoveToRow: "ChatMoveToRow",
  170. ChatToggleChat: "ChatToggleChat",
  171. ChatSendQuestion: "ChatSendQuestion",
  172. ChatSendComment: "ChatSendComment",
  173. ChatTallyVote: "ChatTallyVote",
  174. ChatAcceptBid: "ChatAcceptBid",
  175. ChatSendInvite: "ChatSendInvite",
  176. ChatDeclineInvite: "ChatDeclineInvite",
  177. ChatAcceptInvite: "ChatAcceptInvite",
  178. ChatNotifyMessage: "ChatNotifyMessage",
  179. ChatGotoRow: "ChatGotoRow",
  180. ChatStageUserJoin: "ChatStageUserJoin",
  181. ChatStageUserLeft: "ChatStageUserLeft",
  182. ChatUnnamedSnac22: "ChatUnnamedSnac22",
  183. ChatClose: "ChatClose",
  184. ChatUserBan: "ChatUserBan",
  185. ChatUserUnban: "ChatUserUnban",
  186. ChatJoined: "ChatJoined",
  187. ChatUnnamedSnac27: "ChatUnnamedSnac27",
  188. ChatUnnamedSnac28: "ChatUnnamedSnac28",
  189. ChatUnnamedSnac29: "ChatUnnamedSnac29",
  190. ChatRoomInfoOwner: "ChatRoomInfoOwner",
  191. },
  192. Feedbag: {
  193. FeedbagErr: "FeedbagErr",
  194. FeedbagRightsQuery: "FeedbagRightsQuery",
  195. FeedbagRightsReply: "FeedbagRightsReply",
  196. FeedbagQuery: "FeedbagQuery",
  197. FeedbagQueryIfModified: "FeedbagQueryIfModified",
  198. FeedbagReply: "FeedbagReply",
  199. FeedbagUse: "FeedbagUse",
  200. FeedbagInsertItem: "FeedbagInsertItem",
  201. FeedbagUpdateItem: "FeedbagUpdateItem",
  202. FeedbagDeleteItem: "FeedbagDeleteItem",
  203. FeedbagInsertClass: "FeedbagInsertClass",
  204. FeedbagUpdateClass: "FeedbagUpdateClass",
  205. FeedbagDeleteClass: "FeedbagDeleteClass",
  206. FeedbagStatus: "FeedbagStatus",
  207. FeedbagReplyNotModified: "FeedbagReplyNotModified",
  208. FeedbagDeleteUser: "FeedbagDeleteUser",
  209. FeedbagStartCluster: "FeedbagStartCluster",
  210. FeedbagEndCluster: "FeedbagEndCluster",
  211. FeedbagAuthorizeBuddy: "FeedbagAuthorizeBuddy",
  212. FeedbagPreAuthorizeBuddy: "FeedbagPreAuthorizeBuddy",
  213. FeedbagPreAuthorizedBuddy: "FeedbagPreAuthorizedBuddy",
  214. FeedbagRemoveMe: "FeedbagRemoveMe",
  215. FeedbagRemoveMe2: "FeedbagRemoveMe2",
  216. FeedbagRequestAuthorizeToHost: "FeedbagRequestAuthorizeToHost",
  217. FeedbagRequestAuthorizeToClient: "FeedbagRequestAuthorizeToClient",
  218. FeedbagRespondAuthorizeToHost: "FeedbagRespondAuthorizeToHost",
  219. FeedbagRespondAuthorizeToClient: "FeedbagRespondAuthorizeToClient",
  220. FeedbagBuddyAdded: "FeedbagBuddyAdded",
  221. FeedbagRequestAuthorizeToBadog: "FeedbagRequestAuthorizeToBadog",
  222. FeedbagRespondAuthorizeToBadog: "FeedbagRespondAuthorizeToBadog",
  223. FeedbagBuddyAddedToBadog: "FeedbagBuddyAddedToBadog",
  224. FeedbagTestSnac: "FeedbagTestSnac",
  225. FeedbagForwardMsg: "FeedbagForwardMsg",
  226. FeedbagIsAuthRequiredQuery: "FeedbagIsAuthRequiredQuery",
  227. FeedbagIsAuthRequiredReply: "FeedbagIsAuthRequiredReply",
  228. FeedbagRecentBuddyUpdate: "FeedbagRecentBuddyUpdate",
  229. },
  230. Alert: {
  231. AlertErr: "AlertErr",
  232. AlertSetAlertRequest: "AlertSetAlertRequest",
  233. AlertSetAlertReply: "AlertSetAlertReply",
  234. AlertGetSubsRequest: "AlertGetSubsRequest",
  235. AlertGetSubsResponse: "AlertGetSubsResponse",
  236. AlertNotifyCapabilities: "AlertNotifyCapabilities",
  237. AlertNotify: "AlertNotify",
  238. AlertGetRuleRequest: "AlertGetRuleRequest",
  239. AlertGetRuleReply: "AlertGetRuleReply",
  240. AlertGetFeedRequest: "AlertGetFeedRequest",
  241. AlertGetFeedReply: "AlertGetFeedReply",
  242. AlertRefreshFeed: "AlertRefreshFeed",
  243. AlertEvent: "AlertEvent",
  244. AlertQogSnac: "AlertQogSnac",
  245. AlertRefreshFeedStock: "AlertRefreshFeedStock",
  246. AlertNotifyTransport: "AlertNotifyTransport",
  247. AlertSetAlertRequestV2: "AlertSetAlertRequestV2",
  248. AlertSetAlertReplyV2: "AlertSetAlertReplyV2",
  249. AlertTransitReply: "AlertTransitReply",
  250. AlertNotifyAck: "AlertNotifyAck",
  251. AlertNotifyDisplayCapabilities: "AlertNotifyDisplayCapabilities",
  252. AlertUserOnline: "AlertUserOnline",
  253. },
  254. BART: {
  255. BARTErr: "BARTErr",
  256. BARTUploadQuery: "BARTUploadQuery",
  257. BARTUploadReply: "BARTUploadReply",
  258. BARTDownloadQuery: "BARTDownloadQuery",
  259. BARTDownloadReply: "BARTDownloadReply",
  260. BARTDownload2Query: "BARTDownload2Query",
  261. BARTDownload2Reply: "BARTDownload2Reply",
  262. },
  263. PermitDeny: {
  264. PermitDenyErr: "PermitDenyErr",
  265. PermitDenyRightsQuery: "PermitDenyRightsQuery",
  266. PermitDenyRightsReply: "PermitDenyRightsReply",
  267. PermitDenySetGroupPermitMask: "PermitDenySetGroupPermitMask",
  268. PermitDenyAddPermListEntries: "PermitDenyAddPermListEntries",
  269. PermitDenyDelPermListEntries: "PermitDenyDelPermListEntries",
  270. PermitDenyAddDenyListEntries: "PermitDenyAddDenyListEntries",
  271. PermitDenyDelDenyListEntries: "PermitDenyDelDenyListEntries",
  272. PermitDenyBosErr: "PermitDenyBosErr",
  273. PermitDenyAddTempPermitListEntries: "PermitDenyAddTempPermitListEntries",
  274. PermitDenyDelTempPermitListEntries: "PermitDenyDelTempPermitListEntries",
  275. },
  276. }
  277. // SubGroupName gets the string name of a subgroup within a food group. It
  278. // returns "unknown" if the subgroup doesn't exist.
  279. func SubGroupName(foodGroup uint16, subGroup uint16) string {
  280. name := subGroupName[foodGroup][subGroup]
  281. if name == "" {
  282. name = "unknown"
  283. }
  284. return name
  285. }