Archive > 0.3.x Custom/Unofficial Modules

modules/Mail.php

<< < (2/5) > >>

Wolfbiter:
Well.. here goes my check of the script...


--- Code: ---Line 186: $mailbox=$this->bot->alts->main($user);
Line 187: $no_of_messages=$this->new_mail_count($name);

--- End code ---
I assume it's supposed to use main for mail, but it still checks mail for $name instead of $mailbox.

Maybe make the logon notify a user setting instead of a script setting? Since some people might want to be notified and others doesn't.
For when you add cron, maybe go over buddylist and see if anyone has any unread mail still?
You should remove all commented things that isn't yours (like all the stuff from the template you don't use).

Blueeagle:

--- Quote from: Malosar on March 04, 2007, 06:22:50 pm ---Thats a really good idea, mind if I help out?

--- End quote ---

Thank you and no, go right a head. :)

Edit: Khalem talked something about setting up a dev branch. Now I don't know how to do that but it might be a good idea if several people are to be working on this.

Blueeagle:

--- Quote from: Wolfbiter on March 04, 2007, 06:41:45 pm ---Well.. here goes my check of the script...


--- Code: ---Line 186: $mailbox=$this->bot->alts->main($user);
Line 187: $no_of_messages=$this->new_mail_count($name);

--- End code ---
I assume it's supposed to use main for mail, but it still checks mail for $name instead of $mailbox.

Maybe make the logon notify a user setting instead of a script setting? Since some people might want to be notified and others doesn't.
For when you add cron, maybe go over buddylist and see if anyone has any unread mail still?
You should remove all commented things that isn't yours (like all the stuff from the template you don't use).

--- End quote ---

Yeah I think I missed some notifies. This probably explains it. Thank you.

Alreadythere:
Some errors I caught:

* in mail_send() you have checks to escape the string and replace some stuff. It's working on $mail_message instead of $message though, or the variable in the INSERT should be $mail_message.
* if($settings['Logon_notificaton']=TRUE) in buddy() will always be true ;)
* if(msg===1) in buddy() got one = too many
* I've had to adapt the settings names to the ucfirst(strtolower()) format now used in SVN (I guess you posted the module before I made the change in SVN).
As I don't like spam right on logon I've added a slight delay to the notifies. And I've added default access levels for the commands.

Here is my modified version with the fixes/adds.

PS: forgot to add: if you aren't allowed to send mail it just returns an empty tell. Missing some return value there.

Blueeagle:
Good job mate!

Just to find something to pick on:

--- Quote from: Alreadythere on March 29, 2007, 12:29:56 pm ---
* if(msg===1) in buddy() got one = too many
--- End quote ---

= assings
== checks for equality
=== checks for identicality

if (1 ==  "1") is true while
if (1 === "1") is false because 1 is an integer while "1" is a string

A moot point since the variable type is irellevant in this case. :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version