@create sqlbb @set sqlbb = WIZARD &CMD.BBPOST.SQL sqlbb=[null(setq(z,name(extract(u(#86/groups),%0,1))), setq(y,sql(select forum_id from nuke_bbforums where forum_name ='%qz' AND cat_id='2')),setq(x,iter(get(%5/lastip),baseconv(##,10,16),.,)),setq(v,add(sql(SELECT max(post_id) from nuke_bbposts),1)),setq(u,sql(select user_id from nuke_users where Dbref='%3')),setq(t,add(sql(select Max(topic_id) from nuke_bbtopics),1)), setq(s, edit(elements(a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9,die(10,36,1)),%b,)),setq(r,add(sql(select forum_posts from nuke_bbforums where forum_id=%qY),1)),setq(q,add(sql(select forum_topics from nuke_bbforums where forum_id=%qY),1)),sql(insert into nuke_bbposts (post_id, topic_id, forum_id, poster_id, post_time, poster_ip) values (%qv, %qt, %qy, %qu, %4, '%qx')), sql(insert into nuke_bbposts_text (post_id, bbcode_uid, post_subject, post_text) values (%qv, '%qs', '%1', '%2')), sql(insert into nuke_bbtopics (topic_id, forum_id,topic_poster, topic_title, topic_time,topic_last_post_id,topic_first_post_id) values (%qt,%qy, %qu, '%1', '%4', %qv, %qv)),sql(update nuke_bbforums set forum_posts =%qR where forum_id=%qY),sql(update nuke_bbforums set forum_topics=%qQ where forum_id=%qY), sql(update nuke_bbforums set forum_last_post_id=%qV where forum_id=%qY))] &CMD_NUKEUSER.CREATE sqlbb=$+bbnuke *:@switch [sql(select username from nuke_users where username='%N')]=%N,@pemit %#=[ansi(hr,You have already registered. If there is a problem please contact staff.)], think [u(#155/tri_grabmail)] [u(#155/tri_nukeuser.create, %#, %0)] &CMD_PERSONAL_LOG sqlbb=$+journal *=*:think [null(setq(6,add(sql(SELECT MAX(jid) FROM nuke_journal),1)),setq(7,timefmt($I:$M $p)),setq(9,sql(select username from nuke_user where Dbref='[objid(%#)]')),setq(5,[sqlescape(%0)]),setq(4,[sqlescape(%1)]),setq(8,[timefmt($m-$d-$Y)]))][u(tri_personal_log.sql)] &tri_PERSONAL_LOG.SQL sqlbb=[sql(insert into nuke_journal (jid, aid, title, bodytext, pdate, ptime, status, mtime, mdate) values (%q6, '%q9', '%q5', '%q4', '%q8', '%q7', 'Yes', '%q7', '%q8'))] &HELP_BBPOST.SQLGUIDE sqlbb=[lit(%0)]=board nuber in bbpocket/group%r[lit(%1)]=topic(subject)%r[lit(%2)]=text%r[lit(%3)]=objid%r[lit(%4)]=timestamp%R[lit(%5)]=user DB%r[lit(%qZ)]=board name%R[lit(%qY)]=forum id%R[lit(%qx)]=ip address in hex%R[lit(%qW)]=users objid%R[lit(%qV)]=new post_id%R[lit(%qU)]=user_id%r[lit(%qT)]=topic_id%r[lit(%qS)]=bbcode_id%R[lit(%qR)]=Forum_posts%r[lit(%qQ)]=Forum_Topics%r%r &TRI_GRABMAIL sqlbb=setq(8,extract(u(%#/registration),2,1,|)) &TRI_NUKEUSER.CREATE sqlbb=null(ifelse(words(%q8),u(#155/tri_nukeuser.sql, %1) [pemit(%0,ansi(hg,Added))] ,pemit(%#,ansi(hr,Sorry you must @register before performing this function. See +help @register for more information.)))) &TRI_NUKEUSER.SQL sqlbb=[setq(9,add(sql(select Max(user_id) from nuke_users),1))][setq(8,sqlescape(%q8))][setq(7,sqlescape(%N))][setq(6,sqlescape(%0))][sql(insert into nuke_users (user_id, username, user_email, user_password, Dbref) values (%q9, '%q7', '%q8', md5('%q6'), '[objid(num(*%N))]'))][set(*%N,!Unregistered)] &TRI_SQLNEWGROUP sqlbb=null(setq(1,add(sql(select Max(forum_id) from nuke_bbforums),1)), setq(2,add(sql(select Max(forum_order) from nuke_bbforums),10)), sql(insert into nuke_bbforums (forum_id, cat_id, forum_name, forum_order, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_sticky, auth_announce, auth_vote, auth_pollcreate, auth_attachments, forum_status, forum_posts, forum_topics, prune_enable) values (%q1, 2, '%0', %q2, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0))) @@ BBS updates @lock/Command BBS -Myrddin's Global BBS v4.0.6 =REGISTERED/0 &CMD_+BBNEWGROUP BBS - Myrddin's Global BBS v4.0.6=$+bbnewgroup *:@switch hasflag(%#,wizard)=1, {@create %0; @wait 1={@switch [setr(0,num(%0))]=#-1,{@pemit %#=That's not a good name for a group.},{&groups #86=[switch(words(get(#86/groups)),0,,[get(#86/groups)]%b)]%q0; &own %q0=%#; @set %q0=safe; @set %q0=wizard; &last_mod %q0=[u(#86/bbtime)]; &CANREAD %q0=1; &CANWRITE %q0=1; &config_timeout %q0=[get(#86/config_timeout)];think [u(#155/tri_sqlnewgroup, %0)]; @pemit %#=Group number [member(get(#86/groups),%q0)] added as '%0'. Messages will have [ifelse(get(%q0/config_timeout),a [div(get(%q0/config_timeout),86400)] day,no)] timeout.}}}, {@pemit %#=You can't add groups to the message base.} &CMD_+BBPOST BBS - Myrddin's Global BBS v4.0.6=$+bbpost */*=*:@switch member(u(#86/valid_groups,%#,write),setr(0,u(#86/get_group,%0)))=0, {@pemit %#=Either you do not subscribe to Group #%0, or are unable to post to it.},{&mess_lst %q0=[cat(get(%q0/mess_lst),setr(1,get(#86/nxt_mess)))]; &nxt_mess #86=[ulocal(#86/fn_inc_next_mess,%q1)]; &master_lst #86=[cat(get(#86/master_lst),%q1)]; &hdr_%q1 %q0=[mid(%1, 0, 34)]|[u(#86/bbtime)]|[edefault(%q0/anonymous,mid(name(%#),0,24))]|[owner(%#)]|[ifelse(get(%q0/config_timeout),add(get(%q0/config_timeout),secs()),0)]; &last_mod %q0=[u(#86/bbtime)]; &bdy_%q1 %q0=[%2][ifelse(and(hasattr(%#,bb_sig),not(hasattr(%q0,anonymous))),{%r[ulocal(%#/bb_sig)]},)];think [u(#155/cmd.bbpost.sql, sqlescape(%0), sqlescape(%1), sqlescape(%2), objid(%#), convtime(time()),%#)]; @pemit %#=You post your note about '%1' in group [member(get(#86/groups),%q0)] ([name(%q0)]) as message #[member(get(%q0/mess_lst),%q1)][ifelse(and(hasattr(%#,bb_sig),hasattr(%q0,anonymous)),{%b%bThis is an anonymous group, your BB_SIG was -not- appended.},)]; &bb_read %#=[setunion(get(%#/bb_read),%q1)]; @trigger #86/tr_post_notify=%#,%q0,[member(get(%q0/mess_lst),%q1)],[mid(%1, 0, 34)]} &CMD_+BBPOST2 BBS - Myrddin's Global BBS v4.0.6=$+bbpost */*:@switch hasattr(#86,bb_post_hdr_%#)=1,{@pemit %#=You are already in the middle of writing a bbpost.},{@switch strmatch(%1,*=*)=0,{@switch member(u(#86/valid_groups,%#,write),[setq(0,u(#86/get_group,%0))]%q0)=0,{@pemit %#=Either you do not subscribe to Group #%0 or are unable to post to it.},{&bb_post_hdr_%# #86=%q0|[mid(%1,0,34)]; @pemit %#=%rYou start your posting to Group #[member(get(#86/groups),%q0)] ([name(%q0)]).%rYou can now compose the body of the post by using '+bbwrite '%ror '+bb '. When you are finished, type '+bbpost' by itself.[ifelse(and(hasattr(%#,bb_sig),hasattr(%q0,anonymous)),{%b%bThis is an anonymous group. Your BB_SIG will -not- be appended.},)]}}} &CMD_+BBPOST-POST BBS - Myrddin's Global BBS v4.0.6=$+bbpost:@switch [hasattr(#86,bb_post_hdr_%#)]:[hasattr(#86,bb_post_bdy_%#)]=0:0,{@pemit %#=You do not have a bbpost in progress.},1:0,{@pemit %#=Your post is empty. Please add text with the '+bbwrite ' command or discard the posting with the '+bbtoss' command.},{&mess_lst [setr(0,index(get(#86/bb_post_hdr_%#),|,1,1))]=[cat(get(%q0/mess_lst),setr(1,get(#86/nxt_mess)))]; &nxt_mess #86=[ulocal(#86/fn_inc_next_mess,%q1)]; &master_lst #86=[cat(get(#86/master_lst),%q1)]; &hdr_%q1 %q0=[index(get(#86/bb_post_hdr_%#),|,2,1)]|[u(#86/bbtime)]|[edefault(%q0/anonymous,mid(name(%#),0,24))]|[owner(%#)]|[ifelse(get(%q0/config_timeout),add(get(%q0/config_timeout),secs()),0)]; &last_mod %q0=[u(#86/bbtime)]; &bdy_%q1 %q0={[trim(get(#86/bb_post_bdy_%#))][ifelse(and(hasattr(%#,bb_sig),not(hasattr(%q0,anonymous))),{%r[ulocal(%#/bb_sig)]},)]}; think [u(#155/cmd.bbpost.sql, sqlescape(member(u(#86/groups),%q0)), sqlescape(index(get(#86/bb_post_hdr_%#),|,2,1)), sqlescape(trim(get(#86/bb_post_bdy_%#))), objid(%#), convtime(time()),%#)];@pemit %#=You post your note about '[index(get(#86/bb_post_hdr_%#),|,2,1)]' in group '[name(%q0)]' as message #[member(get(%q0/mess_lst),%q1)]; &bb_read %#=[setunion(get(%#/bb_read),%q1)]; @trigger #86/tr_post_notify=%#,%q0,[member(get(%q0/mess_lst),%q1)],[index(get(#86/bb_post_hdr_%#),|,2,1)]; &bb_post_bdy_%# #86; &bb_post_hdr_%# #86} COMMAND_LOCK`FAILURE [#4]: [ansi(hr,You must finish the registration process before you can use the BB System.)] REGISTERED [#4]: [hasflag(%#,?)] @@ SGP Register Command &CMD-REGISTER SGP - Main Globals=$@register *=*=*:@swi/f [hasattr(%#,registration)]/[match(Player,type(%#))]/[gte(words(%0),2)]/[match(%1,*@*.*)]/[gte(words(%2),1)]=1/*/*/*/*,{@pemit %#=You may not re-register once you have set your registration. If you have made an error, please contact Staff to correct it.},0/0/*/*/*,{@pemit %#=Only Players may use this command.},0/1/1/1/1,{®ISTRATION %#=%0|%1|%2|[time()]|@register;@pemit %#=You have completed registration.},0/1/*/*/*,{@pemit %#=You must provide a full RL name, both first and last, a valid email address, and at least one alt character or None to complete registration. Please see 'news registration', '+help @register' or a member of staff for further assistance.} &CMD-REGISTER-HELP SGP - Main Globals=$@register: @pemit %#=%R%R@register ==%r%r%tAll players must be registered and read and accept the conditions found in 'news AUP' before they are allowed out of the Registration room. Unregistered character objects become subject to nuking at any time.%R%R