This is a documentation of some changes in the current release of Sula PrimeriX that are worth noting. You may want to check the programmer's reference too.This documentation is not neccessarily complete, as it is not always possible to note changes when they occur.
- Sula PrimeriX II - 0.09.5 (02Sep99)
<Undernet> server1:port:...... server2 ... </Undernet>
- Sula Primerix II - 0.09.3 (6Aug99) ------------------------------------ o Course Line - trill/strings: sample module libutil.so - sample_scripts: + sample URL grabber + type and go: fast autocorrection for those typos and abbrevs + sample hooks on INPUT and RAW_NON_NUMERIC, just like replacing all f*** with f***: (gs-shell-hook "#input" 9999 "*fuck*" (lambda(m w) (define n (strstr m "fuck")) (string-set! m (+ 1 n) #\*) (string-set! m (+ 2 n) #\*) (string-set! m (+ 3 n) #\*) (gs-modify-user-input m))) o Removed - _DO_WARRANTY for good. Also removed associated commands. No more copyright and license info. - SET variable match_server_alias - -nick option from comamnd /Send - all redundant DCC related commands fom the _sula_ days: cclose, fclose, achat, get, lfrr,...., rfrr, rfrs,... the whole lot o Rejuvenated - DCC including fixes to DCC RESUME, RENAME, and REJECT. DCC LIST, GET, SEND, CLOSE now exist as such, and not just through convenience commands as was the case in _sula_. - DCC more format strings: o fmt_dcc_chat_notify when you receive a chat offer o fmt_dcc_file_notify when a DCC chat requests comes in As usual, setting can be done via X resource files and via the SET command or via the procedure gs-set!. Defaults: *.Format.ChatNotify: [%H:%M] %i. Chat request from %n (%h) [%z %Z] Sula.Format.FileNotify: [%H:%M] %i. DCC GET [%f %j %k] from %n (%h) [%z %Z] %n, %h, %i, %z, and %Z are nick, user@host, DCC id, remote port and remote internet address (32 bit network number). %f, %j, and %k are filename, size and cksum, respectively. o Renamed - gs-window-dcc to gs-window-chat - dcc:procedures all renamed to chat:XXX. dcc:nick -> chat:nick dcc:window -> chat:window dcc:fd -> chat:fd dcc:IP -> chat:IP dcc:written -> chat:written dcc:read -> chat:read o Genesys or genetic New procedures, largely untested: - chat:userhost : returns the userhost of the CHAT partner. Takes a DCC chat connection from a channel window (see procedure gs-window-chat). - gs-execute0 : shortcut for (gs-execute -1 ....) - gs-modify-user-input Can only be called from within hooks on INPUT. Replaces what the user typed with something else so the parser sees just the new text. - gs-modify-irc-output Can only be called from within hooks on RAW_NON_NUMERIC. *Replaces* an IRC message as soon it comes in. Client then sees only the new text. Not really 'as soon as the message gets in', since RAW_IRC preceeds RAW_NON_NUMERIC. - gs-dcc-list Returns a list of all DCC items (all active and all pending DCC requests and connections). Also see sula-boot for some description. The following procedures then take such items and return specific components: dcc:chat?, dcc:file?, dcc:active?, dcc:queued?, dcc:received?, dcc:sent?, dcc:id, dcc:nick, dcc:userhost, dcc:remote-addr, dcc:remote-IP, dcc:remote-port, dcc:starttime, dcc:bytes-sent, dcc:bytes-received, dcc:file-name; dcc:file-size, dcc:file-checksum So, (let loop((All-DCCs (gs-dcc-list))) (if(not(null? All-DCCs)) (let((one (car All-DCCs))) (say "This one's a DCC " (if(dcc:chat? one) "chat" "File transfer")) (if(and(dcc:chat? one)(dcc:active? one)) (say "You are talking to " (dcc:nick one) " who is from " (dcc:remote-IP one) ". Email him/her at @$" (dcc:userhost one) "@!$. Ack ja, you been chatting for " (- (current-time) (dcc:starttime one)) " seconds!")) (loop (cdr All-DCCs))))) (gs-execute0 "/DCC CLOSE " (if(dcc:sent? a) "GET " "SEND ")(dcc:nick a)) o 1984 (or: Permission to dissect) Normally, hook handlers get only a copy of the server or client message to work with. All modifications to the message are local to the hook. It is now possible for two hook types to globally *modify* the IRC or client message such that subsequent hooks and the user never see the original text. - Hook type RAW_NON_NUMERIC Is allowed to modify messages by calling the procedure gs-modify-irc-output. Other hooks and the client then never see the original IRC message and cant tell whether it's been modified or not. For fear of abuse, support for this tampering must be built into the client using -DMUTABLE_IRC at compile time. Also, at runtime, 'mutable_irc' must be SET on. And since RAW_NON_NUMERIC doesnt work on server numerics, numeric replies cannot be modified. Hooks of type RAW_NON_NUMERIC always use the original message. See the scripts scripts/afuck.scm for an example. - Hook type INPUT Can modify user input by calling the procedure gs-modify-user-input with the replacement text as argument. Related flags (currenntly for RAW_NON_NUMEIRIC) + runtime: /set mutable_irc on|off|toggle + X resource entry: *.mutable_irc: on|of + command line option: -mutable_irc (implies true) o Corrected - /USERHOST nick -cmd ... failed if nick contained '-' o This and That - Sula Primerix II - 0.09.2b (1Aug99) -------------------------------------- o Hitting the ESC key in a channel window no longer automatically hides the console. You'll have to do the binding yourself: (bind-key "Escape" (lambda(w k s) (gs-hide-console(gs-console-visible?)))) o New hook types 1. RAW_NUMERIC 2. RAW_NON_NUMERIC These are cheaper alternatives to RAW_IRC. RAW_IRC ::= RAW_NUMERIC + RAW_NON_NUMERIC. 3. IRC_LINE_OUT IRC_LINE_OUT is triggered when a line from IRC is about to be displayed on the screen. The line has already been processed (hook-checked, dissected, formatted, fired at, etc), and the user is about to see the final result. This hook type offers the possibility of setting hooks based on what the user *actually* sees from IRC. Example: How to grab HT URLs /on #irc_line_out 200 *http://?*.?* (grab-url "$2-") or, since we're only interested in incoming lines, (gs-add-hook "#irc_line_out" 200 "*http://?*.?*" (lambda(m w) (if(not(string=? "OUTGOING" (next-word m 1))) (grab-url m)))) 'grab-url' would be a procedure that can extract URLs from a string. Arguments to IRC_LINE_OUT: server,port str_type str_line int_flag As usual, server,port is the server to which you're connected. type describes the kind of message we're dealing with. It may take any of following values: "PRIV_MSG", "PUB_MSG", "PRIV_NOTICE", "PUB_NOTICE", "ACTION", "DCC", "CTCP_REPLY", "NOTE","SNOTICE", "QUIT", "TOPIC", "OUTGOING", "KICK", "WALLOP", "NUMERIC","MISC". "OUTGOING" is for messages that you are sending out. "MISC" is for all else not mentioned. str_line is the final text to be displayed; if flag==0, text is to be displayed in the upper window. Much information is hidden by the time a message reaches IRC_LINE_OUT (no sender name or address, no destination etc). This is because str_line may not be what somebody actually sent; it might have been altered along the way by other hooks or by a format string. For example, if the variable fmt_pub_msg got set to "<%n> crap: %p", channel messages would get the word "crap" added to them and it would be inaccurate to think that the author of message sent that. o New procedures 1. gs-console-visible? returns TRUE if console visible, otherwise FALSE 2. (gs-set-lag w str_lag) writes str_lag in the lag display. str_lag is a string containing how much you're lagging on the server that is associated with window w. This procedure is provided for those who may have *better* ways of measuring server lag than the internal method that the client uses. To reduce abuse, gs-set-lag displays only the first 8 characters of lag_str [FIXME: Is that ok?]. o The procedure gs-hide-main-window has been renamed to gs-hide-console o changes to hook type DCC_SEND_START: one argument has been added: the position (offset) in the file from where sending is starting. o If Guile support: new flag "verbose_return" to choose whether to automatically display all return values irrespective of type. By default, only string and numeric return values are displayed automatically. As usual, flag value can be changed via X resource entry, the SET cmd, or at the command line: /set verbose_return on|off|toggle *.verbose_return: yes|no %sula -verbose_return o SkriptX: sx-dialog superseded by sx-dialog-new: sx-dialog-new user_data ok_cb cancel_cb [input_fields] sx-dialog does not have a cancel_cb. o moved sample_sripts/cycle.scm into scripts/