Sorry for my lack of updates about my MBBS clone. I have had same familiar issues that kept me away from this project. I am working some hours per week on it, and apart from the Telnet issues that does not affect Windows Telnet client, it is getting better.
Still it is not nearly an Alpha release, but I am satisfied with the core module that handles registering new modules, allows developers to create classes and subclasses, global commands, databases, etc.
The teleconference module is now at 35% (original, not Action Teleconference) and the signup routine of main module is mostly done. Logoff routines for main and registered modules 100%, disconnected routines for core and modules 100%, input routine is 50%, logon core is 100%. So basically the framework is done and working quite fast.
Locks & Keys support is 25% done, on per server locks & keys and users locks & keys.
I was thinking in a XML format for .MSG config files, rather than parsing Stryker's MSG format that is quite complex compared to XML. So, all prfmsg routines are hardcored in Spanish.
I have added a new core routine named Timed_Routine that works like a timer for each user (async) and will add a SysModTimed_Routine for Sincronous routines per module.
Regarding per user and per moder defined variables, are more easy than in Gcomm code. Just define a variables and each user/module gets their vars without the nightmare of Gcomm code for that.
I have respected Gcomm uses of states (switch (usrptr->modstate)) and will like to adapt as many core routines from the original source code. I think this will make mods easier than just rewriting from scratch.
Well, I wanted to let you know that is not vaporware and I plan to release it under some of the licenses available such as GPL, BSD, etc. I have to think about it, as I want to make every change made to the original source code, part of the project.
Here is an example of the teleconference module. It's an ASCII export of the module, so there are some parts not included in the original source code.
Protected Class Teleconference
Inherits kModule
Function Login_Routine() As boolean
Register_Global_Var("NOTMODULE","El modulo no existe")
SendUser chrb(13)+chrb(10)+"Ahora disponible la nueva teleconferencia online!"+chrb(13)+chrb(10)
Return(True)
End Function
Function Init_Routine() As boolean
Register_Global_Var("NOTMODULE","El modulo no existe")
Register_Global_Var("NTERMS",2+2)
shocst ("Teleconference: serial number is not correct!")
Return(true)
End Function
Function Input_Routine() As boolean
Select case user.ModState
case 0
SendUser chrb(13)+chrb(10)+"Teleconference online"+chrb(13)+chrb(10)
SendUser "---------------------"+chrb(13)+chrb(10)
user.ModState = 1
SendToAllUsers("***"+chrb(13)+chrb(10)+user.usrname+" acaba de entrar en el canal!"+chrb(13)+chrb(10)+": ")
ShowWho()
case 1
if margc = 0 then
SendUser chrb(13)+chrb(10)+": "
elseif margc = 1 then
if margv(0) = "x" or margv(0)="exit" then
SendToAllUsers("***"+chrb(13)+chrb(10)+user.usrname+" acaba de salir del canal!"+chrb(13)+chrb(10)+": ")
SendUser "Exiting to the main menu..."+chrb(13)+chrb(10)
Return(true)
elseif margv(0) = "?" or margv(0) = "HELP" then
SendUser chrb(13)+chrb(10)+"Teleconference online"+chrb(13)+chrb(10)
SendUser "---------------------"+chrb(13)+chrb(10)
user.ModState = 1
SendToAllUsers("***"+chrb(13)+chrb(10)+user.usrname+" acaba de entrar en el canal!"+chrb(13)+chrb(10)+": ")
ShowWho()
Return(False)
elseif margv(0) = "WHO" or margv(0) = "#" or margv(0) = "/#" then
ShowWho()
Return(false)
else
SendToChanel()
Return(false)
end if
else
SendToChanel()
end if
end Select
Return(false)
End Function
Function Logoff_Routine() As boolean
Return(true)
End Function
Sub Hangup_Routine()
SendToAllUsers("***"+chrb(13)+chrb(10)+User.usrname+" se ha desconectado del sistema!")
End Sub
Protected Sub SendToChanel()
dim chanusr() as User = me.GetModuleUsers()
if UBound(chanusr) = 0 then
SendUser "***"+chrb(13)+chrb(10)+"Estas solo en este canal!"+chrb(13)+chrb(10)+": "
else
dim a as Integer
for a = 0 to UBound(chanusr)
if chanusr(a).usrname <> User.usrname then
chanusr(a).CurrentModule.SendUser(chrb(13)+chrb(10)+"From "+user.usrname+": "+user.InpBuff+chrb(13)+chrb(10)+": ")
else
SendUser("*** Mensaje enviado ***"+chrb(13)+chrb(10)+": ")
end if
next
end if
End Sub
Protected Sub ShowWho()
Dim UsersConnected() as User = GetModuleUsers(), b as Integer
if UBound(UsersConnected) =-1 then Return
for b = 0 to UBound(UsersConnected)
if UsersConnected(b).usrname = User.usrname then
UsersConnected.Remove b
exit for
end if
next
Select case ubound(UsersConnected)
case -1
SendUser "Estas solo en este canal!"+chrb(13)+chrb(10)+": "
case 0
SendUser UsersConnected(0).usrname+" esta contigo en este canal"+chrb(13)+chrb(10)+": "
case 1
SendUser UsersConnected(0).usrname+" y "+UsersConnected(1).usrname+" estan contigo en este canal"+chrb(13)+chrb(10)+": "
else
dim a as Integer
dim tmpbuff as string
tmpbuff = UsersConnected(0).usrname
for a = 1 to UBound(UsersConnected) - 1
tmpbuff = tmpbuff + ", " + UsersConnected(a).usrname
next
tmpbuff = tmpbuff + " y "+UsersConnected(a).usrname+" estan contigo en este canal"+chrb(13)+chrb(10)+": "
SendUser(tmpbuff)
end Select
End Sub
As you can see, there is a lot of work to be done, but more or less it will follow Gcomm structure.
If there are interest, I will release this project under one of the licenses I said above, to keep the project alive.
I have no Gcomm source code now, and the routines are from what I remember when I was learning C and my first steps at MajorBBS arch. I have to say that I am just an amateur programmer and there are many many things to polish and other that my skills are not good.
Hm.. I haven't written English for a loong time, and I hope you can understand my message without major problems...
Please, let me know what do you think about it.
Regards,
Amando Blasco