Autouseradd is never silent

Bug #380461 reported by DJKRose on 2009-05-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
BeBot
Low
Thomas Juberg

Bug Description

Even if you configure "!set Autouseradd Notify off" users get still notified when they are added to the bot.

The reason might be a wrong parameter count for the user_add function:

/modules/aoc/Autouseradd.php, line 109:
  $this -> bot -> core("user") -> add($this -> bot -> botname, $name, 0, MEMBER, 0, $silent);

/core/User.php, line 69:
 function add ($source, $name, $id=0, $user_level, $silent=0)

As you can see, the parameter count differs and so the function is ALWAYS called with 0 for silent parameter, and the last parameter $silent is dropped.

Solution: Remove "0, " in Autouseradd.php

---

As a long-term solution the code should be cleaned up to not intentionally throw php warnings! Then E_WARNING could be turned on without filling the screen with useless information and such errors could be found instantly.

Thomas Juberg (thomas-juberg) wrote :

Fix committed.

A long term solution would be to do a proper cleanup indeed. Hopefully someone will find the time to start working on that eventually.
Patches are most welcome as well.

Changed in bebot:
assignee: nobody → ShadowMaster (thomas-juberg)
importance: Undecided → Low
status: New → Fix Committed
Changed in bebot:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers